1
0
mirror of https://github.com/redis/go-redis.git synced 2025-12-02 06:22:31 +03:00

allow e2e tests to run longer

This commit is contained in:
Nedyalko Dyakov
2025-10-28 15:43:58 +02:00
parent c2d525f688
commit 1510181ece
5 changed files with 9 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import (
"log"
"os"
"testing"
"time"
"github.com/redis/go-redis/v9"
"github.com/redis/go-redis/v9/logging"
@@ -12,6 +13,8 @@ import (
// Global log collector
var logCollector *TestLogCollector
const defaultTestTimeout = 30 * time.Minute
// Global fault injector client
var faultInjector *FaultInjectorClient

View File

@@ -21,7 +21,7 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
t.Skip("Scenario tests require E2E_SCENARIO_TESTS=true")
}
ctx, cancel := context.WithTimeout(context.Background(), 25*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
defer cancel()
var dump = true

View File

@@ -19,7 +19,7 @@ func TestPushNotifications(t *testing.T) {
t.Skip("Scenario tests require E2E_SCENARIO_TESTS=true")
}
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
defer cancel()
// Setup: Create fresh database and client factory for this test
@@ -395,8 +395,9 @@ func TestPushNotifications(t *testing.T) {
p("Executing commands and collecting logs for analysis... This will take 30 seconds...")
go commandsRunner.FireCommandsUntilStop(ctx)
time.Sleep(30 * time.Second)
time.Sleep(time.Minute)
commandsRunner.Stop()
time.Sleep(time.Minute)
allLogsAnalysis := logCollector.GetAnalysis()
trackerAnalysis := tracker.GetAnalysis()

View File

@@ -19,7 +19,7 @@ func TestStressPushNotifications(t *testing.T) {
t.Skip("[STRESS][SKIP] Scenario tests require E2E_SCENARIO_TESTS=true")
}
ctx, cancel := context.WithTimeout(context.Background(), 35*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), 40*time.Minute)
defer cancel()
// Setup: Create fresh database and client factory for this test

View File

@@ -20,7 +20,7 @@ func ТestTLSConfigurationsPushNotifications(t *testing.T) {
t.Skip("Scenario tests require E2E_SCENARIO_TESTS=true")
}
ctx, cancel := context.WithTimeout(context.Background(), 25*time.Minute)
ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout)
defer cancel()
var dump = true