@@ -86,7 +86,10 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
8686 t .Run (endpointTest .name , func (t * testing.T ) {
8787 // Clear logs between endpoint type tests
8888 logCollector .Clear ()
89- dump = true // reset dump flag
89+ // reset errors detected flag
90+ errorsDetected = false
91+ // reset dump flag
92+ dump = true
9093 // redefine p and e for each test to get
9194 // proper test name in logs and proper test failures
9295 var p = func (format string , args ... interface {}) {
@@ -229,16 +232,6 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
229232 ef ("Failed to trigger migrate action for %s: %v" , endpointTest .name , err )
230233 }
231234
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-
242235 // Wait for migration to complete
243236 status , err = faultInjector .WaitForAction (ctx , migrateResp .ActionID ,
244237 WithMaxWaitTime (240 * time .Second ),
@@ -249,6 +242,16 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
249242 }
250243 p ("[FI] Migrate action completed for %s: %s" , endpointTest .name , status .Status )
251244
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+
252255 // Wait for MIGRATED notification
253256 seqIDToObserve = int64 (migrateData ["seqID" ].(float64 ))
254257 connIDToObserve = uint64 (migrateData ["connID" ].(float64 ))
0 commit comments