Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'autoack - value beneath null values' test flaking #219

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

lejeunerenard
Copy link
Contributor

@lejeunerenard lejeunerenard commented Feb 17, 2025

Previously the test could fail when an ack triggered during checks for sync(). The ack would complete before the final promise resolved in sync() causing the length stored before the 1s timeout to be the final resolved length that is supposed to be different.

This is just a timing issue where the 'before' is remembered after the 'after' is complete.

100ms didn't flake after ~195 runs mining the test. Previously the test flaked after ~20-30 runs. Increasing the ackInterval doesn't significantly increase the test time as it is less than the 1s timeout waiting for the ack.

Fix has been changed to saving the length before calling sync().

Previously the test could fail when an ack triggered during checks for
`sync()`. The ack would complete before the final promise resolved in
`sync()` causing the length stored before the 1s timeout to be the final
resolved length that is supposed to be different.

This is just a timing issue where the 'before' is remembered after the
'after' is complete.

100ms didn't flake after ~195 runs mining the test.
Test still broke w/ the longer `ackInterval` when the test took even
longer. The length can be stored immediately after appending to prevent
timing issues.
@lejeunerenard
Copy link
Contributor Author

Hmm. Just got it to flake still when running all tests together. The test seems to have taken longer than normal (3266ms).

@lejeunerenard lejeunerenard changed the title Increase ackInterval in 'autoack - value beneath null values' test Fix 'autoack - value beneath null values' test flaking Feb 17, 2025
@mafintosh
Copy link
Contributor

its bugging out cause now it might ack during the sync

@mafintosh
Copy link
Contributor

so we find a way, for testing, to disable that or make the condition simpler at least

@mafintosh
Copy link
Contributor

might be easier to simply assert that the view gets indexed

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.

2 participants