chore(model): slightly deflake TestRecvOnlyRevertOwnID (#10390)
Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -459,6 +459,7 @@ func TestRecvOnlyRevertOwnID(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
go func() {
|
||||
defer cancel()
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
@@ -466,9 +467,9 @@ func TestRecvOnlyRevertOwnID(t *testing.T) {
|
||||
case <-sub.C():
|
||||
if file, _ := m.testCurrentFolderFile(f.ID, name); file.Deleted {
|
||||
t.Error("local file was deleted")
|
||||
cancel()
|
||||
return
|
||||
} else if file.IsEquivalent(fi, f.modTimeWindow) {
|
||||
cancel() // That's what we are waiting for
|
||||
return // That's what we are waiting for
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user