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

fixing races in 2 test cases #610

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sanji-programmer
Copy link

Hi,

I noticed the both test cases failed sometimes (see below). After some investigation, I noticed that the function ensureIndex is not sync (as stated in the comment) and some operations may races with the assertions. The changes seemed to solve the race as I ran the test cases several times with no error.

1) Database
       Using indexes
         ensureIndex and index initialization in database loading
           ensureIndex can be called before a loadDatabase and still be initialized and filled correctly:

      Uncaught AssertionError: expected 0 to equal 3
      + expected - actual

      -0
      +3
  1 failing

  1) Database
       Using indexes
         ensureIndex and index initialization in database loading
           If a unique constraint is not respected, database loading will not work and no data will be inserted:
     Uncaught TypeError: Cannot read property 'should' of undefined

I posted a issue #609 to update the documentation of the function.

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.

1 participant