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 mq.datastore test #751

Merged
merged 1 commit into from
Feb 25, 2024
Merged

Conversation

Maks-s
Copy link
Contributor

@Maks-s Maks-s commented Feb 25, 2024

Hello, awesome software 👍 !

I couldn't get the test to work no matter what I tried. Commit 687d1f0 helped, it made the test pass 9 times out of 10

This PR makes it work 10/10, but github loves to blow up when someone changes an indent so here's a rundown of what this PR does

  • Replace sleep with FakeTime
  • Use try/finally to remove tmpFile and close the db even when a test fails
  • Wait for the queue to be empty before running the 'subscribe' assert (see line 54)

If I may also suggest, BDD testing could be nice to better track and fix failing tests

@zefhemel
Copy link
Collaborator

Thanks for this!

Regarding BDD: I'm open to it. For me the current approach has been ok, but open to contributions!

@zefhemel zefhemel merged commit 481387d into silverbulletmd:main Feb 25, 2024
1 check passed
@Maks-s Maks-s deleted the fix-datastore-test branch February 25, 2024 07:54
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