@@ -561,7 +561,7 @@ func CreateTestFaultInjector() (*FaultInjectorClient, error) {
561561//
562562// Decision logic based on environment:
563563// 1. If REDIS_ENDPOINTS_CONFIG_PATH is set -> use real fault injector from FAULT_INJECTION_API_URL
564- // 2. If REDIS_ENDPOINTS_CONFIG_PATH is NOT set -> use Docker fault injector at http://localhost:5000
564+ // 2. If REDIS_ENDPOINTS_CONFIG_PATH is NOT set -> use Docker fault injector at http://localhost:15000
565565//
566566// Both the Docker proxy and fault injector should already be running (started via Docker Compose)
567567// This function does NOT start any services - it only connects to existing ones
@@ -578,9 +578,9 @@ func CreateTestFaultInjectorWithCleanup() (*FaultInjectorClient, func(), error)
578578 // If environment config fails, use Docker fault injector
579579 // Note: GetEnvConfig() only fails if REDIS_ENDPOINTS_CONFIG_PATH is not set
580580 if err != nil {
581- // Use Docker fault injector at http://localhost:5000
581+ // Use Docker fault injector at http://localhost:15000 (updated to avoid macOS Control Center conflict)
582582 // The fault injector should already be running via docker-compose
583- faultInjectorURL := "http://localhost:5000 "
583+ faultInjectorURL := "http://localhost:15000 "
584584
585585 // Check if fault injector is accessible
586586 client := & http.Client {Timeout : 2 * time .Second }
@@ -1012,7 +1012,7 @@ func SetupTestDatabaseWithConfig(t *testing.T, ctx context.Context, dbConfig Dat
10121012// SetupTestDatabaseAndFactory creates a database from environment config and returns both bdbID, factory, test mode config, and cleanup function
10131013// This is the recommended way to setup tests as it ensures the client factory connects to the newly created database
10141014//
1015- // If REDIS_ENDPOINTS_CONFIG_PATH is not set, it will use the Docker proxy setup (localhost:7000 ) instead of creating a new database.
1015+ // If REDIS_ENDPOINTS_CONFIG_PATH is not set, it will use the Docker proxy setup (127.0.0.1:17000 ) instead of creating a new database.
10161016// This allows tests to work with either the real fault injector OR the Docker proxy setup.
10171017//
10181018// Usage:
@@ -1024,12 +1024,12 @@ func SetupTestDatabaseAndFactory(t *testing.T, ctx context.Context, databaseName
10241024 envConfig , err := GetEnvConfig ()
10251025 if err != nil {
10261026 // No environment config - use Docker proxy setup
1027- t .Logf ("No environment config found, using Docker proxy setup at localhost:7000 " )
1027+ t .Logf ("No environment config found, using Docker proxy setup at 127.0.0.1:17000 " )
10281028
10291029 // Create a simple Redis connection config for Docker proxy
10301030 redisConfig := & RedisConnectionConfig {
1031- Host : "localhost" ,
1032- Port : 7000 ,
1031+ Host : "127.0.0.1" , // Use 127.0.0.1 to force IPv4
1032+ Port : 17000 ,
10331033 Username : "" ,
10341034 Password : "" ,
10351035 TLS : false ,
@@ -1126,7 +1126,7 @@ func SetupTestDatabaseAndFactory(t *testing.T, ctx context.Context, databaseName
11261126
11271127// SetupTestDatabaseAndFactoryWithConfig creates a database with custom config and returns both bdbID, factory, test mode config, and cleanup function
11281128//
1129- // If REDIS_ENDPOINTS_CONFIG_PATH is not set, it will use the Docker proxy setup (localhost:7000 ) instead of creating a new database.
1129+ // If REDIS_ENDPOINTS_CONFIG_PATH is not set, it will use the Docker proxy setup (127.0.0.1:17000 ) instead of creating a new database.
11301130// This allows tests to work with either the real fault injector OR the Docker proxy setup.
11311131//
11321132// Usage:
@@ -1138,12 +1138,12 @@ func SetupTestDatabaseAndFactoryWithConfig(t *testing.T, ctx context.Context, da
11381138 envConfig , err := GetEnvConfig ()
11391139 if err != nil {
11401140 // No environment config - use Docker proxy setup
1141- t .Logf ("No environment config found, using Docker proxy setup at localhost:7000 " )
1141+ t .Logf ("No environment config found, using Docker proxy setup at 127.0.0.1:17000 " )
11421142
11431143 // Create a simple Redis connection config for Docker proxy
11441144 redisConfig := & RedisConnectionConfig {
1145- Host : "localhost" ,
1146- Port : 7000 ,
1145+ Host : "127.0.0.1" , // Use 127.0.0.1 to force IPv4
1146+ Port : 17000 ,
11471147 Username : "" ,
11481148 Password : "" ,
11491149 TLS : false ,
0 commit comments