Skip to content

Commit 4529a84

Browse files
use with force
1 parent d26ec76 commit 4529a84

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

flow/e2e/pg_schema_dump_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ func (s PeerFlowE2ETestSuitePG) Test_PG_Schema_Dump_And_CDC() {
3131
return
3232
}
3333
defer dropConn.Close(ctx)
34-
_, _ = dropConn.Exec(ctx, fmt.Sprintf(
35-
"SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname='%s' AND pid <> pg_backend_pid()", dstDBName))
36-
if _, err := dropConn.Exec(ctx, "DROP DATABASE IF EXISTS "+dstDBName); err != nil {
34+
if _, err := dropConn.Exec(ctx, "DROP DATABASE IF EXISTS "+dstDBName+" WITH (FORCE)"); err != nil {
3735
s.t.Logf("failed to drop destination database %s: %v", dstDBName, err)
3836
}
3937
})

0 commit comments

Comments
 (0)