Skip to content

Conversation

@barspi
Copy link
Contributor

@barspi barspi commented Jan 7, 2026

testEntryEventuallyRemovedAfterWaitersDrain was failing randomly because of thread timing chaos.
It failed more consistently in github actions. It failed less often on my fast machine.

This PR:

  • introduces a new latch to make sure LSpace operations happen in a more orderly manner.
  • a separate assert to test whether the lsp.in(key) got the correct value after asserting that it got some value.

Now it has passed the test on github. And after several hundred runs, it hasn't failed on my machine either.

@alcarraz
Copy link
Contributor

alcarraz commented Jan 7, 2026

Hi @barspi, have you considered awaitility for solving this kind of issues?

Just so we don't have to put arbitrary waiting times or code like the countdown latches. We would need to add a test dependency, but it would be useful for other tests as well.

@ar ar merged commit c0cbaa6 into jpos:main Jan 7, 2026
2 checks passed
@barspi barspi deleted the fix/testEntryEventuallyRemovedAfterWaitersDrain branch January 7, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants