@@ -86,7 +86,10 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
86
86
t .Run (endpointTest .name , func (t * testing.T ) {
87
87
// Clear logs between endpoint type tests
88
88
logCollector .Clear ()
89
- dump = true // reset dump flag
89
+ // reset errors detected flag
90
+ errorsDetected = false
91
+ // reset dump flag
92
+ dump = true
90
93
// redefine p and e for each test to get
91
94
// proper test name in logs and proper test failures
92
95
var p = func (format string , args ... interface {}) {
@@ -229,16 +232,6 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
229
232
ef ("Failed to trigger migrate action for %s: %v" , endpointTest .name , err )
230
233
}
231
234
232
- // Wait for MIGRATING notification
233
- match , found = logCollector .WaitForLogMatchFunc (func (s string ) bool {
234
- return strings .Contains (s , logs2 .ProcessingNotificationMessage ) && strings .Contains (s , "MIGRATING" )
235
- }, 60 * time .Second )
236
- if ! found {
237
- ef ("MIGRATING notification was not received for %s endpoint type" , endpointTest .name )
238
- }
239
- migrateData := logs2 .ExtractDataFromLogMessage (match )
240
- p ("MIGRATING notification received for %s: %v" , endpointTest .name , migrateData )
241
-
242
235
// Wait for migration to complete
243
236
status , err = faultInjector .WaitForAction (ctx , migrateResp .ActionID ,
244
237
WithMaxWaitTime (240 * time .Second ),
@@ -249,6 +242,16 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
249
242
}
250
243
p ("[FI] Migrate action completed for %s: %s" , endpointTest .name , status .Status )
251
244
245
+ // Wait for MIGRATING notification
246
+ match , found = logCollector .WaitForLogMatchFunc (func (s string ) bool {
247
+ return strings .Contains (s , logs2 .ProcessingNotificationMessage ) && strings .Contains (s , "MIGRATING" )
248
+ }, 60 * time .Second )
249
+ if ! found {
250
+ ef ("MIGRATING notification was not received for %s endpoint type" , endpointTest .name )
251
+ }
252
+ migrateData := logs2 .ExtractDataFromLogMessage (match )
253
+ p ("MIGRATING notification received for %s: %v" , endpointTest .name , migrateData )
254
+
252
255
// Wait for MIGRATED notification
253
256
seqIDToObserve = int64 (migrateData ["seqID" ].(float64 ))
254
257
connIDToObserve = uint64 (migrateData ["connID" ].(float64 ))
0 commit comments