Skip to content

Commit

Permalink
Merge pull request #5397 from filecoin-project/fix/sync-manager-test-…
Browse files Browse the repository at this point in the history
…flake

fix a flake in the sync manager edge case test
  • Loading branch information
magik6k authored Jan 21, 2021
2 parents 23ce064 + 4cdb7ba commit e5efe57
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions chain/sync_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ func TestSyncManagerEdgeCase(t *testing.T) {

// get the next sync target; it should be c1 as the heaviest tipset but added last (same weight as c2)
bop = <-stc
if bop.ts.Equals(c2) {
// there's a small race and we might get c2 first.
// But we should still end on c1.
bop.done()
bop = <-stc
}

if !bop.ts.Equals(c1) {
t.Fatalf("Expected tipset %s to sync, but got %s", c1, bop.ts)
}
Expand Down

0 comments on commit e5efe57

Please sign in to comment.