Skip to content

Commit

Permalink
spinlocks->eventually
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-butcher committed Jan 15, 2025
1 parent e986442 commit d6e6ce1
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ class WorkMatcherTest
_ == SubgraphId(idA, idB)
) == 0
) {
while (!cHasReadGraph) {}
eventually(timeout = timeout(5 seconds)) {
if (!cHasReadGraph) throw new Exception("not yet")
}
}

// (**) We don't let the update to 'C' start writing graph updates until
Expand All @@ -417,7 +419,10 @@ class WorkMatcherTest
)) &&
createdLocksHistory.count(_ == SubgraphId(idA, idB)) == 1
) {
while (locks.contains(idA.underlying)) {}
eventually(timeout = timeout(5 seconds)) {
if (locks.contains(idA.underlying))
throw new Exception("not yet")
}
}
createdLocksHistory = createdLocksHistory :+ id
}
Expand Down

0 comments on commit d6e6ce1

Please sign in to comment.