internal: ensure schema manager is closed (#5521)

This releases the connection it holds indefinitely
This commit is contained in:
Johan Brandhorst-Satzkorn authored and GitHub committed 2025-02-06 13:49:49 -08:00
1 parent acc40e0d08
commit 5de0c8c102
4 files changed
+5

No files matched your search

+1
View File
@@ -125,6 +125,7 @@ func testInitStore(t testing.TB, cleanup func() error, url string) {
require.NoError(t, err)
sm, err := schema.NewManager(ctx, schema.Dialect(dialect), d)
require.NoError(t, err)
t.Cleanup(func() { sm.Close(context.Background()) })
_, err = sm.ApplyMigrations(ctx)
require.NoError(t, err)
}