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

@@ -19,6 +19,7 @@ func ApplyMigration(t *testing.T, ctx context.Context, d *sql.DB, migrationId in
schema.TestCreatePartialEditions(schema.Dialect(dialect), schema.PartialEditions{"oss": migrationId}),
))
require.NoError(t, err)
t.Cleanup(func() { m.Close(context.Background()) })
_, err = m.ApplyMigrations(ctx)
require.NoError(t, err)
state, err := m.CurrentState(ctx)
+1
View File
@@ -25,6 +25,7 @@ func MigrateStore(ctx context.Context, dialect Dialect, url string, opt ...Optio
if err != nil {
return false, errors.Wrap(ctx, err, op)
}
defer sMan.Close(ctx)
st, err := sMan.CurrentState(ctx)
if err != nil {