Fix expectations in lock manager test (#9592)

The test optimistically assumed that threads will mostly execute in order, while ignoring all other possibilities.
Changes the order of the report so that we remove the potential non-determinism.

As discovered in https://github.com/enso-org/enso/actions/runs/8516468592/job/23325541262?pr=9584#step:8:1530
This commit is contained in:
Hubert Plociniczak 2024-04-02 13:46:44 +02:00 committed by GitHub
parent bef6f3a4f9
commit ab5fe1757e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,8 +74,8 @@ class ConnectedLockManagerTest
)
)
) { _ =>
sync.signal("primary-acquired")
sync.report("primary-acquired")
sync.signal("primary-acquired")
sync.waitFor("connected-is-waiting")
sync.report("primary-releasing")
}
@ -122,8 +122,8 @@ class ConnectedLockManagerTest
)
)
) { _ =>
sync.signal("primary-acquired")
sync.report("primary-acquired")
sync.signal("primary-acquired")
sync.waitFor("connected-acquired")
}