mirror of
https://github.com/redis/go-redis.git
synced 2025-12-03 18:31:14 +03:00
allow e2e tests to run longer
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/redis/go-redis/v9"
|
"github.com/redis/go-redis/v9"
|
||||||
"github.com/redis/go-redis/v9/logging"
|
"github.com/redis/go-redis/v9/logging"
|
||||||
@@ -12,6 +13,8 @@ import (
|
|||||||
// Global log collector
|
// Global log collector
|
||||||
var logCollector *TestLogCollector
|
var logCollector *TestLogCollector
|
||||||
|
|
||||||
|
const defaultTestTimeout = 30 * time.Minute
|
||||||
|
|
||||||
// Global fault injector client
|
// Global fault injector client
|
||||||
var faultInjector *FaultInjectorClient
|
var faultInjector *FaultInjectorClient
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ func TestEndpointTypesPushNotifications(t *testing.T) {
|
|||||||
t.Skip("Scenario tests require E2E_SCENARIO_TESTS=true")
|
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()
|
defer cancel()
|
||||||
|
|
||||||
var dump = true
|
var dump = true
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ func TestPushNotifications(t *testing.T) {
|
|||||||
t.Skip("Scenario tests require E2E_SCENARIO_TESTS=true")
|
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()
|
defer cancel()
|
||||||
|
|
||||||
// Setup: Create fresh database and client factory for this test
|
// 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...")
|
p("Executing commands and collecting logs for analysis... This will take 30 seconds...")
|
||||||
go commandsRunner.FireCommandsUntilStop(ctx)
|
go commandsRunner.FireCommandsUntilStop(ctx)
|
||||||
time.Sleep(30 * time.Second)
|
time.Sleep(time.Minute)
|
||||||
commandsRunner.Stop()
|
commandsRunner.Stop()
|
||||||
|
time.Sleep(time.Minute)
|
||||||
allLogsAnalysis := logCollector.GetAnalysis()
|
allLogsAnalysis := logCollector.GetAnalysis()
|
||||||
trackerAnalysis := tracker.GetAnalysis()
|
trackerAnalysis := tracker.GetAnalysis()
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ func TestStressPushNotifications(t *testing.T) {
|
|||||||
t.Skip("[STRESS][SKIP] Scenario tests require E2E_SCENARIO_TESTS=true")
|
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()
|
defer cancel()
|
||||||
|
|
||||||
// Setup: Create fresh database and client factory for this test
|
// Setup: Create fresh database and client factory for this test
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ func ТestTLSConfigurationsPushNotifications(t *testing.T) {
|
|||||||
t.Skip("Scenario tests require E2E_SCENARIO_TESTS=true")
|
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()
|
defer cancel()
|
||||||
|
|
||||||
var dump = true
|
var dump = true
|
||||||
|
|||||||
Reference in New Issue
Block a user