@@ -61,6 +61,7 @@ func (s *WatcherTestSuite) TestRegisterConsumerTwiceWillError() {
6161 consumer , err := watcher .RegisterConsumer (s .ctx , "test" )
6262 s .Require ().NoError (err )
6363 s .Require ().NotNil (consumer )
64+ consumeEvents (consumer )
6465
6566 consumer , err = watcher .RegisterConsumer (s .ctx , "test" )
6667 s .Require ().ErrorIs (err , common .ErrConsumerAlreadyRegistered )
@@ -117,6 +118,7 @@ func (s *WatcherTestSuite) TestProducerAndConsumer() {
117118 watcher .WithOperationTypeFilter (common .UpdateOperation ))
118119 s .Require ().NoError (err )
119120 s .Require ().NotNil (consumer )
121+ consumeEvents (consumer )
120122
121123 payload := common.ChangePayload {
122124 EntityType : common .ControllerEntityType ,
@@ -141,6 +143,7 @@ func (s *WatcherTestSuite) TestConsumeWithFilter() {
141143 watcher .WithOperationTypeFilter (common .UpdateOperation ))
142144 s .Require ().NoError (err )
143145 s .Require ().NotNil (consumer )
146+ consumeEvents (consumer )
144147
145148 payload := common.ChangePayload {
146149 EntityType : common .ControllerEntityType ,
@@ -184,6 +187,7 @@ func (s *WatcherTestSuite) TestWithAnyFilter() {
184187 ))
185188 s .Require ().NoError (err )
186189 s .Require ().NotNil (consumer )
190+ consumeEvents (consumer )
187191
188192 payload := common.ChangePayload {
189193 EntityType : common .ControllerEntityType ,
@@ -265,6 +269,7 @@ func (s *WatcherTestSuite) TestWithAllFilter() {
265269 ))
266270 s .Require ().NoError (err )
267271 s .Require ().NotNil (consumer )
272+ consumeEvents (consumer )
268273
269274 payload := common.ChangePayload {
270275 EntityType : common .RepositoryEntityType ,
@@ -329,6 +334,7 @@ func (s *WatcherTestSuite) TestWithEntityPoolFilterRepository() {
329334 )
330335 s .Require ().NoError (err )
331336 s .Require ().NotNil (consumer )
337+ consumeEvents (consumer )
332338
333339 payload := common.ChangePayload {
334340 EntityType : common .PoolEntityType ,
@@ -377,6 +383,7 @@ func (s *WatcherTestSuite) TestWithEntityPoolFilterOrg() {
377383 )
378384 s .Require ().NoError (err )
379385 s .Require ().NotNil (consumer )
386+ consumeEvents (consumer )
380387
381388 payload := common.ChangePayload {
382389 EntityType : common .PoolEntityType ,
@@ -425,6 +432,7 @@ func (s *WatcherTestSuite) TestWithEntityPoolFilterEnterprise() {
425432 )
426433 s .Require ().NoError (err )
427434 s .Require ().NotNil (consumer )
435+ consumeEvents (consumer )
428436
429437 payload := common.ChangePayload {
430438 EntityType : common .PoolEntityType ,
@@ -490,6 +498,7 @@ func (s *WatcherTestSuite) TestWithEntityPoolFilterBogusEntityType() {
490498 )
491499 s .Require ().NoError (err )
492500 s .Require ().NotNil (consumer )
501+ consumeEvents (consumer )
493502
494503 payload := common.ChangePayload {
495504 EntityType : common .PoolEntityType ,
@@ -541,6 +550,7 @@ func (s *WatcherTestSuite) TestWithEntityScaleSetFilterRepository() {
541550 )
542551 s .Require ().NoError (err )
543552 s .Require ().NotNil (consumer )
553+ consumeEvents (consumer )
544554
545555 payload := common.ChangePayload {
546556 EntityType : common .ScaleSetEntityType ,
@@ -592,6 +602,7 @@ func (s *WatcherTestSuite) TestWithEntityScaleSetFilterOrg() {
592602 )
593603 s .Require ().NoError (err )
594604 s .Require ().NotNil (consumer )
605+ consumeEvents (consumer )
595606
596607 payload := common.ChangePayload {
597608 EntityType : common .ScaleSetEntityType ,
@@ -643,6 +654,7 @@ func (s *WatcherTestSuite) TestWithEntityScaleSetFilterEnterprise() {
643654 )
644655 s .Require ().NoError (err )
645656 s .Require ().NotNil (consumer )
657+ consumeEvents (consumer )
646658
647659 payload := common.ChangePayload {
648660 EntityType : common .ScaleSetEntityType ,
@@ -696,6 +708,7 @@ func (s *WatcherTestSuite) TestWithEntityScaleSetFilterBogusEntityType() {
696708 )
697709 s .Require ().NoError (err )
698710 s .Require ().NotNil (consumer )
711+ consumeEvents (consumer )
699712
700713 payload := common.ChangePayload {
701714 EntityType : common .ScaleSetEntityType ,
@@ -747,6 +760,7 @@ func (s *WatcherTestSuite) TestWithEntityScaleSetFilterReturnsFalseForGiteaEndpo
747760 )
748761 s .Require ().NoError (err )
749762 s .Require ().NotNil (consumer )
763+ consumeEvents (consumer )
750764
751765 payload := common.ChangePayload {
752766 EntityType : common .ScaleSetEntityType ,
@@ -781,6 +795,7 @@ func (s *WatcherTestSuite) TestWithEntityFilterRepository() {
781795 )
782796 s .Require ().NoError (err )
783797 s .Require ().NotNil (consumer )
798+ consumeEvents (consumer )
784799
785800 payload := common.ChangePayload {
786801 EntityType : common .RepositoryEntityType ,
@@ -831,6 +846,7 @@ func (s *WatcherTestSuite) TestWithEntityFilterOrg() {
831846 )
832847 s .Require ().NoError (err )
833848 s .Require ().NotNil (consumer )
849+ consumeEvents (consumer )
834850
835851 payload := common.ChangePayload {
836852 EntityType : common .OrganizationEntityType ,
@@ -879,6 +895,7 @@ func (s *WatcherTestSuite) TestWithEntityFilterEnterprise() {
879895 )
880896 s .Require ().NoError (err )
881897 s .Require ().NotNil (consumer )
898+ consumeEvents (consumer )
882899
883900 payload := common.ChangePayload {
884901 EntityType : common .EnterpriseEntityType ,
@@ -933,6 +950,7 @@ func (s *WatcherTestSuite) TestWithEntityJobFilterRepository() {
933950 )
934951 s .Require ().NoError (err )
935952 s .Require ().NotNil (consumer )
953+ consumeEvents (consumer )
936954
937955 payload := common.ChangePayload {
938956 EntityType : common .JobEntityType ,
@@ -989,6 +1007,7 @@ func (s *WatcherTestSuite) TestWithEntityJobFilterOrg() {
9891007 )
9901008 s .Require ().NoError (err )
9911009 s .Require ().NotNil (consumer )
1010+ consumeEvents (consumer )
9921011
9931012 payload := common.ChangePayload {
9941013 EntityType : common .JobEntityType ,
@@ -1045,6 +1064,7 @@ func (s *WatcherTestSuite) TestWithEntityJobFilterEnterprise() {
10451064 )
10461065 s .Require ().NoError (err )
10471066 s .Require ().NotNil (consumer )
1067+ consumeEvents (consumer )
10481068
10491069 payload := common.ChangePayload {
10501070 EntityType : common .JobEntityType ,
@@ -1097,6 +1117,7 @@ func (s *WatcherTestSuite) TestWithEntityJobFilterBogusEntityType() {
10971117 )
10981118 s .Require ().NoError (err )
10991119 s .Require ().NotNil (consumer )
1120+ consumeEvents (consumer )
11001121
11011122 payload := common.ChangePayload {
11021123 EntityType : common .JobEntityType ,
@@ -1140,6 +1161,7 @@ func (s *WatcherTestSuite) TestWithNone() {
11401161 )
11411162 s .Require ().NoError (err )
11421163 s .Require ().NotNil (consumer )
1164+ consumeEvents (consumer )
11431165
11441166 payload := common.ChangePayload {
11451167 EntityType : common .RepositoryEntityType ,
@@ -1174,6 +1196,7 @@ func (s *WatcherTestSuite) TestWithUserIDFilter() {
11741196 )
11751197 s .Require ().NoError (err )
11761198 s .Require ().NotNil (consumer )
1199+ consumeEvents (consumer )
11771200
11781201 payload := common.ChangePayload {
11791202 EntityType : common .UserEntityType ,
@@ -1231,6 +1254,7 @@ func (s *WatcherTestSuite) TestWithForgeCredentialsGithub() {
12311254 )
12321255 s .Require ().NoError (err )
12331256 s .Require ().NotNil (consumer )
1257+ consumeEvents (consumer )
12341258
12351259 payload := common.ChangePayload {
12361260 EntityType : common .GithubCredentialsEntityType ,
@@ -1288,6 +1312,7 @@ func (s *WatcherTestSuite) TestWithcaleSetFilter() {
12881312 )
12891313 s .Require ().NoError (err )
12901314 s .Require ().NotNil (consumer )
1315+ consumeEvents (consumer )
12911316
12921317 payload := common.ChangePayload {
12931318 EntityType : common .ScaleSetEntityType ,
@@ -1341,6 +1366,7 @@ func (s *WatcherTestSuite) TestWithExcludeEntityTypeFilter() {
13411366 )
13421367 s .Require ().NoError (err )
13431368 s .Require ().NotNil (consumer )
1369+ consumeEvents (consumer )
13441370
13451371 payload := common.ChangePayload {
13461372 EntityType : common .RepositoryEntityType ,
@@ -1386,6 +1412,7 @@ func (s *WatcherTestSuite) TestWithInstanceStatusFilter() {
13861412 )
13871413 s .Require ().NoError (err )
13881414 s .Require ().NotNil (consumer )
1415+ consumeEvents (consumer )
13891416
13901417 payload := common.ChangePayload {
13911418 EntityType : common .InstanceEntityType ,
0 commit comments