Skip to content

Commit e27d232

Browse files
committed
maybe the notification is already received
1 parent bbd7b8d commit e27d232

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

maintnotifications/e2e/scenario_endpoint_types_test.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,20 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
6060
logCollector.Clear()
6161
}()
6262

63+
// Create fault injector
64+
faultInjector, err := CreateTestFaultInjector()
65+
if err != nil {
66+
t.Fatalf("[ERROR] Failed to create fault injector: %v", err)
67+
}
68+
69+
6370
// Create client factory from configuration
6471
factory, err := CreateTestClientFactory("standalone")
6572
if err != nil {
6673
t.Skipf("Enterprise cluster not available, skipping endpoint types test: %v", err)
6774
}
6875
endpointConfig := factory.GetConfig()
6976

70-
// Create fault injector
71-
faultInjector, err := CreateTestFaultInjector()
72-
if err != nil {
73-
t.Fatalf("[ERROR] Failed to create fault injector: %v", err)
74-
}
7577

7678
defer func() {
7779
if dump {
@@ -230,7 +232,7 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
230232
p("[FI] Migrate action completed for %s: %+v", endpointTest.name, status)
231233

232234
// Wait for MIGRATING notification
233-
match, found = logCollector.WaitForLogMatchFunc(func(s string) bool {
235+
match, found = logCollector.MatchOrWaitForLogMatchFunc(func(s string) bool {
234236
return strings.Contains(s, logs2.ProcessingNotificationMessage) && strings.Contains(s, "MIGRATING")
235237
}, 60*time.Second)
236238
if !found {

maintnotifications/e2e/scenario_push_notifications_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func TestPushNotifications(t *testing.T) {
182182
ef("Failed to trigger migrate action: %v", err)
183183
}
184184
go func() {
185-
match, found = logCollector.WaitForLogMatchFunc(func(s string) bool {
185+
match, found = logCollector.MatchOrWaitForLogMatchFunc(func(s string) bool {
186186
return strings.Contains(s, logs2.ProcessingNotificationMessage) && strings.Contains(s, "MIGRATING")
187187
}, 60*time.Second)
188188
commandsRunner.Stop()

maintnotifications/e2e/scenario_timeout_configs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ func TestTimeoutConfigurationsPushNotifications(t *testing.T) {
239239
p("[FI] Migrate action completed for %s: %+v", timeoutTest.name, status)
240240

241241
// Wait for MIGRATING notification
242-
match, found = logCollector.WaitForLogMatchFunc(func(s string) bool {
242+
match, found = logCollector.MatchOrWaitForLogMatchFunc(func(s string) bool {
243243
return strings.Contains(s, logs2.ProcessingNotificationMessage) && strings.Contains(s, "MIGRATING")
244244
}, 60*time.Second)
245245
if !found {

maintnotifications/e2e/scenario_tls_configs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func ТestTLSConfigurationsPushNotifications(t *testing.T) {
182182
}
183183

184184
// Wait for MIGRATING notification
185-
match, found := logCollector.WaitForLogMatchFunc(func(s string) bool {
185+
match, found := logCollector.MatchOrWaitForLogMatchFunc(func(s string) bool {
186186
return strings.Contains(s, logs2.ProcessingNotificationMessage) && strings.Contains(s, "MIGRATING")
187187
}, 60*time.Second)
188188
if !found {

0 commit comments

Comments
 (0)