Skip to content

Commit ec4b0cf

Browse files
authored
Fix test on Windows. (#693)
1 parent c29f123 commit ec4b0cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/dotc1z/clone_sync_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ func TestCloneSyncMigratedColumnOrder(t *testing.T) {
141141
// Step 5: Open the clone and verify grants survived intact.
142142
cloneFile, err := NewC1ZFile(ctx, clonePath)
143143
require.NoError(t, err)
144-
defer cloneFile.Close(ctx)
145144

146145
cloneSyncID, err := cloneFile.LatestSyncID(ctx, connectorstore.SyncTypeFull)
147146
require.NoError(t, err)
@@ -172,4 +171,9 @@ func TestCloneSyncMigratedColumnOrder(t *testing.T) {
172171
require.Equal(t, "ent1", expandableClone.GetEntitlement().GetId())
173172
require.Equal(t, "user", expandableClone.GetPrincipal().GetId().GetResourceType())
174173
require.Equal(t, "u1", expandableClone.GetPrincipal().GetId().GetResource())
174+
175+
// srcFile is a raw C1File with no outputFilePath, so Close() would fail
176+
// trying to saveC1z. Just release the database handle directly.
177+
require.NoError(t, srcFile.rawDb.Close())
178+
require.NoError(t, cloneFile.Close(ctx))
175179
}

0 commit comments

Comments
 (0)