Skip to content

Commit 094ea6b

Browse files
authored
tests: fix data race in catchpoint tests (#6593)
1 parent 35fbfd4 commit 094ea6b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ledger/catchpointfilewriter_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,10 @@ func testCatchpointFlushRound(l *Ledger) (basics.Round, basics.Round) {
860860
l.trackers.mu.Unlock()
861861

862862
r, _ := l.LatestCommitted()
863+
l.trackerMu.Lock()
863864
l.trackers.committedUpTo(r)
864865
l.trackers.waitAccountsWriting()
866+
l.trackerMu.Unlock()
865867
return r, l.LatestTrackerCommitted()
866868
}
867869

0 commit comments

Comments
 (0)