mirror of
https://github.com/kopia/kopia.git
synced 2026-10-04 16:14:54 -04:00
server: test flake fix (#839)
Addresses https://github.com/kopia/kopia/runs/1915273219?check_suite_focus=true Verified by testing 100 times.
This commit is contained in:
1 parent
c990fc9ec1
commit
fe9ebfb671
1 file changed
+3
@@ -46,6 +46,9 @@ func startServer(ctx context.Context, t *testing.T) *repo.APIServerInfo {
|
||||
|
||||
s.SetRepository(ctx, env.Repository)
|
||||
|
||||
// ensure we disconnect the repository before shutting down the server.
|
||||
t.Cleanup(func() { s.SetRepository(ctx, nil) })
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user