Skip to content

Commit 256a2f9

Browse files
committed
fix TestHandleNotifications
1 parent c8ab89c commit 256a2f9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

internal/pgengine/notification_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ func TestHandleNotifications(t *testing.T) {
5757
defer conn.Release()
5858
_, err = conn.Exec(ctx, "UNLISTEN *") // do not interfere with the main handler
5959
assert.NoError(t, err)
60-
notifyAndCheck(ctx, pge.ConfigDb, pge, t, "pgengine_unit_test")
60+
notifyAndCheck(ctx, pge.ConfigDb, pge, t, pge.ClientName)
6161
}

internal/testutils/testcontainers.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ func SetupPostgresContainerWithOptions(t *testing.T, customizer func(*config.Cmd
3838
postgres.WithDatabase("timetable"),
3939
postgres.WithUsername("scheduler"),
4040
postgres.WithPassword("somestrong"),
41-
testcontainers.WithWaitStrategyAndDeadline(30*time.Second, wait.ForLog("database system is ready to accept connections")),
41+
testcontainers.WithWaitStrategyAndDeadline(
42+
60*time.Second,
43+
wait.ForLog("database system is ready to accept connections").WithOccurrence(2),
44+
),
4245
)
4346
if err != nil {
4447
t.Fatalf("Failed to start PostgreSQL container: %v", err)

0 commit comments

Comments
 (0)