Skip to content

Commit dfa7bd1

Browse files
committed
less logs, correct check
1 parent dbe717b commit dfa7bd1

File tree

2 files changed

+3
-32
lines changed

2 files changed

+3
-32
lines changed

maintnotifications/e2e/config_parser_test.go

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ func (cf *ClientFactory) Create(key string, options *CreateClientOptions) (redis
379379
}
380380
}
381381

382-
fmt.Printf("Creating single client with options: %+v\n", clientOptions)
383382
client = redis.NewClient(clientOptions)
384383
}
385384

@@ -675,15 +674,11 @@ func (m *TestDatabaseManager) CreateDatabaseFromEnvConfig(ctx context.Context, e
675674
// CreateDatabase creates a database and waits for it to be ready
676675
// Returns the bdb_id of the created database
677676
func (m *TestDatabaseManager) CreateDatabase(ctx context.Context, dbConfig DatabaseConfig) (int, error) {
678-
m.t.Logf("Creating database '%s' on port %d...", dbConfig.Name, dbConfig.Port)
679-
680677
resp, err := m.faultInjector.CreateDatabase(ctx, m.clusterIndex, dbConfig)
681678
if err != nil {
682679
return 0, fmt.Errorf("failed to trigger database creation: %w", err)
683680
}
684681

685-
m.t.Logf("Database creation triggered. Action ID: %s", resp.ActionID)
686-
687682
// Wait for creation to complete
688683
status, err := m.faultInjector.WaitForAction(ctx, resp.ActionID,
689684
WithMaxWaitTime(5*time.Minute),
@@ -713,23 +708,18 @@ func (m *TestDatabaseManager) CreateDatabase(ctx context.Context, dbConfig Datab
713708
}
714709

715710
m.createdBdbID = bdbID
716-
m.t.Logf("Database created successfully with bdb_id: %d", bdbID)
717711

718712
return bdbID, nil
719713
}
720714

721715
// CreateDatabaseAndGetConfig creates a database and returns both the bdb_id and the full connection config from the fault injector response
722716
// This includes endpoints, username, password, TLS settings, and raw_endpoints
723717
func (m *TestDatabaseManager) CreateDatabaseAndGetConfig(ctx context.Context, dbConfig DatabaseConfig) (int, EnvDatabaseConfig, error) {
724-
m.t.Logf("Creating database '%s' on port %d...", dbConfig.Name, dbConfig.Port)
725-
726718
resp, err := m.faultInjector.CreateDatabase(ctx, m.clusterIndex, dbConfig)
727719
if err != nil {
728720
return 0, EnvDatabaseConfig{}, fmt.Errorf("failed to trigger database creation: %w", err)
729721
}
730722

731-
m.t.Logf("Database creation triggered. Action ID: %s", resp.ActionID)
732-
733723
// Wait for creation to complete
734724
status, err := m.faultInjector.WaitForAction(ctx, resp.ActionID,
735725
WithMaxWaitTime(5*time.Minute),
@@ -828,9 +818,6 @@ func (m *TestDatabaseManager) CreateDatabaseAndGetConfig(ctx context.Context, db
828818
}
829819

830820
m.createdBdbID = bdbID
831-
m.t.Logf("Database created successfully with bdb_id: %d", bdbID)
832-
m.t.Logf("Database endpoints: %v", envConfig.Endpoints)
833-
834821
return bdbID, envConfig, nil
835822
}
836823

@@ -840,14 +827,11 @@ func (m *TestDatabaseManager) DeleteDatabase(ctx context.Context) error {
840827
return fmt.Errorf("no database to delete (bdb_id is 0)")
841828
}
842829

843-
m.t.Logf("Deleting database with bdb_id: %d...", m.createdBdbID)
844-
845830
resp, err := m.faultInjector.DeleteDatabase(ctx, m.clusterIndex, m.createdBdbID)
846831
if err != nil {
847832
return fmt.Errorf("failed to trigger database deletion: %w", err)
848833
}
849834

850-
m.t.Logf("Database deletion triggered. Action ID: %s", resp.ActionID)
851835

852836
// Wait for deletion to complete
853837
status, err := m.faultInjector.WaitForAction(ctx, resp.ActionID,
@@ -861,7 +845,6 @@ func (m *TestDatabaseManager) DeleteDatabase(ctx context.Context) error {
861845
return fmt.Errorf("database deletion failed: %v", status.Error)
862846
}
863847

864-
m.t.Logf("Database deleted successfully")
865848
m.createdBdbID = 0
866849

867850
return nil
@@ -1028,12 +1011,6 @@ func SetupTestDatabaseAndFactory(t *testing.T, ctx context.Context, databaseName
10281011
t.Fatalf("Failed to create test database: %v", err)
10291012
}
10301013

1031-
t.Logf("Database created successfully:")
1032-
t.Logf(" bdb_id: %d", bdbID)
1033-
t.Logf(" endpoints: %v", newEnvConfig.Endpoints)
1034-
t.Logf(" username: %s", newEnvConfig.Username)
1035-
t.Logf(" TLS: %v", newEnvConfig.TLS)
1036-
10371014
// Use certificate location from original config if not provided by fault injector
10381015
if newEnvConfig.CertificatesLocation == "" && envDbConfig.CertificatesLocation != "" {
10391016
newEnvConfig.CertificatesLocation = envDbConfig.CertificatesLocation
@@ -1109,12 +1086,6 @@ func SetupTestDatabaseAndFactoryWithConfig(t *testing.T, ctx context.Context, da
11091086
t.Fatalf("Failed to create test database: %v", err)
11101087
}
11111088

1112-
t.Logf("Database created successfully:")
1113-
t.Logf(" bdb_id: %d", bdbID)
1114-
t.Logf(" endpoints: %v", newEnvConfig.Endpoints)
1115-
t.Logf(" username: %s", newEnvConfig.Username)
1116-
t.Logf(" TLS: %v", newEnvConfig.TLS)
1117-
11181089
// Use certificate location from original config if not provided by fault injector
11191090
if newEnvConfig.CertificatesLocation == "" && envDbConfig.CertificatesLocation != "" {
11201091
newEnvConfig.CertificatesLocation = envDbConfig.CertificatesLocation

maintnotifications/e2e/scenario_push_notifications_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,9 +422,9 @@ func TestPushNotifications(t *testing.T) {
422422
e("Expected relaxed timeouts after post-handoff, got none")
423423
}
424424
// validate number of connections we do not exceed max connections
425-
// we started a second client, so we expect 2x the connections
426-
if allLogsAnalysis.ConnectionCount > int64(maxConnections)*2 {
427-
e("Expected no more than %d connections, got %d", maxConnections, allLogsAnalysis.ConnectionCount)
425+
// we started three clients, so we expect 3x the connections
426+
if allLogsAnalysis.ConnectionCount > int64(maxConnections)*3 {
427+
e("Expected no more than %d connections, got %d", maxConnections*3, allLogsAnalysis.ConnectionCount)
428428
}
429429

430430
if allLogsAnalysis.ConnectionCount < int64(minIdleConns) {

0 commit comments

Comments
 (0)