From 8a06cf0973fc0c3b67e77a83974bf321f82f0c59 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Thu, 1 Aug 2019 11:07:41 +0200 Subject: [PATCH] lib/model: Unflake TestPullInvalidIgnored (#5918) --- lib/model/requests_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/model/requests_test.go b/lib/model/requests_test.go index 86a6ffd7e..6ffe8fc08 100644 --- a/lib/model/requests_test.go +++ b/lib/model/requests_test.go @@ -367,10 +367,8 @@ func pullInvalidIgnored(t *testing.T, ft config.FolderType) { expected := map[string]struct{}{ign: {}, ignExisting: {}} // The indexes will normally arrive in one update, but it is possible // that they arrive in separate ones. - secondIndex := false fc.mut.Lock() fc.indexFn = func(folder string, fs []protocol.FileInfo) { - secondIndex = true for _, f := range fs { if _, ok := expected[f.Name]; !ok { t.Errorf("Unexpected file %v was updated in index", f.Name) @@ -396,8 +394,6 @@ func pullInvalidIgnored(t *testing.T, ft config.FolderType) { } if len(expected) == 0 { close(done) - } else if secondIndex { - t.Error("Didn't receive index updates for all existing files, missing", expected) } } // Make sure pulling doesn't interfere, as index updates are racy and @@ -413,7 +409,7 @@ func pullInvalidIgnored(t *testing.T, ft config.FolderType) { select { case <-time.After(5 * time.Second): - t.Fatalf("timed out before index was received") + t.Fatal("timed out before receiving index updates for all existing files, missing", expected) case <-done: } }