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:
Jarek Kowalski authored and GitHub committed 2021-02-16 19:40:50 -08:00
1 parent c990fc9ec1
commit fe9ebfb671
1 file changed
+3
+3
View File
@@ -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)
}