Skip to content

Commit ec6c8dc

Browse files
committed
IgnoreAnyFunction will be less flaky
1 parent a30e647 commit ec6c8dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dbos/utils_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ func setupDBOS(t *testing.T, dropDB bool, checkLeaks bool) DBOSContext {
6767

6868
// Register cleanup to run after test completes
6969
t.Cleanup(func() {
70-
fmt.Println("Cleaning up DBOS instance...")
7170
dbosCtx.(*dbosContext).logger.Info("Cleaning up DBOS instance...")
7271
if dbosCtx != nil {
7372
dbosCtx.Shutdown(30 * time.Second) // Wait for workflows to finish and shutdown admin server and system database
@@ -77,8 +76,9 @@ func setupDBOS(t *testing.T, dropDB bool, checkLeaks bool) DBOSContext {
7776
goleak.VerifyNone(t,
7877
// Ignore pgx health checks
7978
// https://github.com/jackc/pgx/blob/15bca4a4e14e0049777c1245dba4c16300fe4fd0/pgxpool/pool.go#L417
80-
goleak.IgnoreTopFunction("github.com/jackc/pgx/v5/pgxpool.(*Pool).backgroundHealthCheck"),
81-
goleak.IgnoreTopFunction("github.com/jackc/pgx/v5/pgxpool.(*Pool).triggerHealthCheck"),
79+
goleak.IgnoreAnyFunction("github.com/jackc/pgx/v5/pgxpool.(*Pool).backgroundHealthCheck"),
80+
goleak.IgnoreAnyFunction("github.com/jackc/pgx/v5/pgxpool.(*Pool).triggerHealthCheck"),
81+
goleak.IgnoreAnyFunction("github.com/jackc/pgx/v5/pgxpool.(*Pool).triggerHealthCheck.func1"),
8282
)
8383
}
8484
})

0 commit comments

Comments
 (0)