diff --git a/integration/tests/access/cohort3/grpc_state_stream_test.go b/integration/tests/access/cohort3/grpc_state_stream_test.go index ac7b36ad665..d4f77b9245d 100644 --- a/integration/tests/access/cohort3/grpc_state_stream_test.go +++ b/integration/tests/access/cohort3/grpc_state_stream_test.go @@ -234,8 +234,10 @@ func (s *GrpcStateStreamSuite) TestHappyPath() { targetEvent := flow.EventType("flow.AccountCreated") - foundANTxCount := 0 + foundANTxTestCount := 0 + foundANTxControlCount := 0 foundONTxCount := 0 + messageIndex := counters.NewMonotonousCounter(0) r := NewResponseTracker(compareEventsResponse, 3) @@ -252,16 +254,16 @@ func (s *GrpcStateStreamSuite) TestHappyPath() { if has(event.Events, targetEvent) { s.T().Logf("adding access test events: %d %d %v", event.Height, len(event.Events), event.Events) r.Add(s.T(), event.Height, "access_test", event) - foundANTxCount++ + foundANTxTestCount++ } case event := <-controlANEvents: if has(event.Events, targetEvent) { if ok := messageIndex.Set(event.MessageIndex); !ok { s.Require().NoErrorf(err, "messageIndex isn`t sequential") } - s.T().Logf("adding control events: %d %d %v", event.Height, len(event.Events), event.Events) r.Add(s.T(), event.Height, "access_control", event) + foundANTxControlCount++ } case event := <-testONEvents: if has(event.Events, targetEvent) { @@ -271,7 +273,9 @@ func (s *GrpcStateStreamSuite) TestHappyPath() { } } - if foundANTxCount >= txCount && foundONTxCount >= txCount { + if foundANTxTestCount >= txCount && + foundONTxCount >= txCount && + foundANTxControlCount >= txCount { break } }