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 a slightly flaky test #159

Merged
merged 1 commit into from
Jun 25, 2024
Merged

✅ Fix a slightly flaky test #159

merged 1 commit into from
Jun 25, 2024

Conversation

alecgibson
Copy link
Contributor

Sometimes this test fails with:

  1) mongo db connection
       via url string with mongoPoll and pollDelay option
         delays queryPoll but not commit:

      Uncaught AssertionError: expected 1000 to be above 1000
      + expected - actual

      at /home/runner/work/sharedb-mongo/sharedb-mongo/test/test_mongo.js:541:48
      at /home/runner/work/sharedb-mongo/sharedb-mongo/index.js:133:2086
      at /home/runner/work/sharedb-mongo/sharedb-mongo/index.js:133:109
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

We don't care about the exact millisecond, so this change updates the assertion to greaterThanOrEqual()

Sometimes this test fails with:

```
  1) mongo db connection
       via url string with mongoPoll and pollDelay option
         delays queryPoll but not commit:

      Uncaught AssertionError: expected 1000 to be above 1000
      + expected - actual

      at /home/runner/work/sharedb-mongo/sharedb-mongo/test/test_mongo.js:541:48
      at /home/runner/work/sharedb-mongo/sharedb-mongo/index.js:133:2086
      at /home/runner/work/sharedb-mongo/sharedb-mongo/index.js:133:109
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
```

We don't care about the exact millisecond, so this change updates the
assertion to `greaterThanOrEqual()`
@coveralls
Copy link

Coverage Status

coverage: 92.725%. remained the same
when pulling 3470ec5 on poll-delay-fix
into dc887c7 on master.

@alecgibson alecgibson merged commit 02fbf78 into master Jun 25, 2024
26 checks passed
@alecgibson alecgibson deleted the poll-delay-fix branch June 25, 2024 16:12
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