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

[tests] Fix Backend.ETS tests #60

Merged
merged 1 commit into from
Jul 16, 2023
Merged

Conversation

JuneKelly
Copy link
Contributor

@JuneKelly JuneKelly commented Jul 16, 2023

Fixes #59

At some point along the way these tests broke. It seems that the pruning timer is only set up once (when the first instance of Backend.ETS is spawned), and so in the "timeout pruning" test the prune timer never fires, so the bucket never gets pruned.

This indicates an issue with the backend architecture, and with the structure of the tests, but for now we can fix this by deleting the ETS table between test runs, so the timer will be initialized on each run.

This commit also includes some other minor tweaks:

  • Change the key used in the pruning test
  • Use start_supervised in test setup
  • Remove the :ets_table_name option to Backend.ETS, which was never actually used

At some point along the way these tests broke. It seems that the pruning
timer is only set up once (when the first instance of Backend.ETS is
spawned), and so in the "timeout pruning" test the prune timer never
fires, so the bucket never gets pruned.

This indicates an issue with the backend architecture, and with the
structure of the tests, but for now we can fix this by deleting the ETS
table between test runs, so the timer will be initialized on each run.

This commit also includes some other minor tweaks:
- Change the key used in the pruning test
- Use start_supervised in test setup
- Remove the :ets_table_name option to Backend.ETS, which was never
actually used
@epinault epinault merged commit d095e85 into master Jul 16, 2023
10 checks passed
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.

Backend.ETS Tests Failing?
2 participants