Skip to content

Commit a53e6fc

Browse files
authored
fix test on windows (#482)
* fix test on windows On Windows, the test fails because os.Remove cannot remove unclosed and still-handled files. * use t.Error instead of t.Log
1 parent b690b78 commit a53e6fc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: source/testing/testing.go

+10
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ func TestReadUp(t *testing.T, d source.Driver) {
129129
t.Errorf("expected up to be nil, got %v, in %v", up, i)
130130
}
131131
}
132+
if up != nil {
133+
if err := up.Close(); err != nil {
134+
t.Error(err)
135+
}
136+
}
132137
}
133138
}
134139

@@ -166,5 +171,10 @@ func TestReadDown(t *testing.T, d source.Driver) {
166171
t.Errorf("expected down to be nil, got %v, in %v", down, i)
167172
}
168173
}
174+
if down != nil {
175+
if err := down.Close(); err != nil {
176+
t.Error(err)
177+
}
178+
}
169179
}
170180
}

0 commit comments

Comments
 (0)