Skip to content

Commit 2983d52

Browse files
Fixes
Signed-off-by: Elena Kolevska <[email protected]>
1 parent e33c72e commit 2983d52

File tree

7 files changed

+18
-41
lines changed

7 files changed

+18
-41
lines changed

maintnotifications/e2e/fault_injector_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,17 +525,20 @@ func (c *FaultInjectorClient) request(ctx context.Context, method, path string,
525525

526526
// GetClusterNodes returns a list of cluster node IDs
527527
func GetClusterNodes() []string {
528+
// TODO Implement
528529
// This would typically be configured via environment or discovery
529530
return []string{"node-1", "node-2", "node-3", "node-4", "node-5", "node-6"}
530531
}
531532

532533
// GetMasterNodes returns a list of master node IDs
533534
func GetMasterNodes() []string {
535+
// TODO Implement
534536
return []string{"node-1", "node-2", "node-3"}
535537
}
536538

537539
// GetSlaveNodes returns a list of slave node IDs
538540
func GetSlaveNodes() []string {
541+
// TODO Implement
539542
return []string{"node-4", "node-5", "node-6"}
540543
}
541544

maintnotifications/e2e/scenario_endpoint_types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
5959
}()
6060

6161
// Create client factory from configuration
62-
factory, err := CreateTestClientFactory("enterprise-cluster")
62+
factory, err := CreateTestClientFactory("standalone")
6363
if err != nil {
6464
t.Skipf("Enterprise cluster not available, skipping endpoint types test: %v", err)
6565
}

maintnotifications/e2e/scenario_push_notifications_test.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestPushNotifications(t *testing.T) {
5959
}()
6060

6161
// Create client factory from configuration
62-
factory, err := CreateTestClientFactory("enterprise-cluster")
62+
factory, err := CreateTestClientFactory("standalone")
6363
if err != nil {
6464
t.Skipf("Enterprise cluster not available, skipping push notification tests: %v", err)
6565
}
@@ -82,7 +82,7 @@ func TestPushNotifications(t *testing.T) {
8282
MaxActiveConns: maxConnections,
8383
MaintNotificationsConfig: &maintnotifications.Config{
8484
Mode: maintnotifications.ModeEnabled,
85-
HandoffTimeout: 30 * time.Second, // 30 seconds
85+
HandoffTimeout: 40 * time.Second, // 30 seconds
8686
RelaxedTimeout: 10 * time.Second, // 10 seconds relaxed timeout
8787
PostHandoffRelaxedDuration: 2 * time.Second, // 2 seconds post-handoff relaxed duration
8888
MaxWorkers: 20,
@@ -258,10 +258,16 @@ func TestPushNotifications(t *testing.T) {
258258
MinIdleConns: minIdleConns,
259259
MaxActiveConns: maxConnections,
260260
MaintNotificationsConfig: &maintnotifications.Config{
261-
Mode: maintnotifications.ModeEnabled,
262-
RelaxedTimeout: 30 * time.Minute,
261+
Mode: maintnotifications.ModeEnabled,
262+
HandoffTimeout: 40 * time.Second, // 30 seconds
263+
RelaxedTimeout: 30 * time.Minute, // 30 minutes relaxed timeout for second client
264+
PostHandoffRelaxedDuration: 2 * time.Second, // 2 seconds post-handoff relaxed duration
265+
MaxWorkers: 20,
266+
EndpointType: maintnotifications.EndpointTypeExternalIP, // Use external IP for enterprise
263267
},
268+
ClientName: "push-notification-test-client-2",
264269
})
270+
265271
if err != nil {
266272
t.Fatalf("failed to create client: %v", err)
267273
}
@@ -282,7 +288,7 @@ func TestPushNotifications(t *testing.T) {
282288
}
283289
}()
284290

285-
p("Waiting for MOVING notification")
291+
p("Waiting for MOVING notification on second client")
286292
match, found = logCollector.MatchOrWaitForLogMatchFunc(func(s string) bool {
287293
return strings.Contains(s, logs2.ProcessingNotificationMessage) && notificationType(s, "MOVING")
288294
}, 2*time.Minute)

maintnotifications/e2e/scenario_stress_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func TestStressPushNotifications(t *testing.T) {
4949
}()
5050

5151
// Create client factory from configuration
52-
factory, err := CreateTestClientFactory("enterprise-cluster")
52+
factory, err := CreateTestClientFactory("standalone")
5353
if err != nil {
5454
t.Skipf("Enterprise cluster not available, skipping stress test: %v", err)
5555
}

maintnotifications/e2e/scenario_timeout_configs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func TestTimeoutConfigurationsPushNotifications(t *testing.T) {
7777
}()
7878

7979
// Create client factory from configuration
80-
factory, err := CreateTestClientFactory("enterprise-cluster")
80+
factory, err := CreateTestClientFactory("standalone")
8181
if err != nil {
8282
t.Skipf("Enterprise cluster not available, skipping timeout configs test: %v", err)
8383
}

maintnotifications/e2e/scenario_tls_configs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func TestTLSConfigurationsPushNotifications(t *testing.T) {
7474
}()
7575

7676
// Create client factory from configuration
77-
factory, err := CreateTestClientFactory("enterprise-cluster")
77+
factory, err := CreateTestClientFactory("standalone")
7878
if err != nil {
7979
t.Skipf("Enterprise cluster not available, skipping TLS configs test: %v", err)
8080
}

maintnotifications/e2e/utils_test.go

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,5 @@
11
package e2e
22

3-
import (
4-
"context"
5-
"sync"
6-
7-
"github.com/redis/go-redis/v9"
8-
)
9-
10-
func pingOnAllIdleConns(client redis.UniversalClient) error {
11-
idleConnsNum := client.PoolStats().IdleConns
12-
wg := sync.WaitGroup{}
13-
err := error(nil)
14-
errCh := make(chan error, idleConnsNum)
15-
if idleConnsNum == 0 {
16-
idleConnsNum = 1
17-
}
18-
for i := uint32(0); i < idleConnsNum; i++ {
19-
wg.Add(1)
20-
go func() {
21-
defer wg.Done()
22-
errCh <- client.Ping(context.Background()).Err()
23-
}()
24-
}
25-
wg.Wait()
26-
close(errCh)
27-
for err = range errCh {
28-
if err != nil {
29-
return err
30-
}
31-
}
32-
return nil
33-
}
34-
353
func isTimeout(errMsg string) bool {
364
return contains(errMsg, "i/o timeout") ||
375
contains(errMsg, "deadline exceeded") ||

0 commit comments

Comments
 (0)