Closed
Conversation
Contributor
|
Failing test: it('pouchdb.find() should not return design-docs', async () => {
...
}More informationWhen the failing test is run in isolation, it passes. it.only('pouchdb.find() should not return design-docs', async () => {
...
// I pass
}However, when the failing test is run alongside 1 specific other test, it fails: it.only('must be able to insert->update->delete via new_edits:false', async () => {
...
// I pass
}
it.only('pouchdb.find() should not return design-docs', async () => {
...
// I fail
}If you put in a small delay, both tests pass: it.only('must be able to insert->update->delete via new_edits:false', async () => {
...
// I pass
}
it.only('pouchdb.find() should not return design-docs', async () => {
// add in a small delay, so there is no overlap of creating this database and closing the other test's database
await promiseWait(50);
...
// Now I pass, too
}Preventing closing one in-memory database when another in-memory database is open also allows the test to pass it.only('must be able to insert->update->delete via new_edits:false', async () => {
...
// Don't close pouch on this test
// pouch.close();
// I pass
}
it.only('pouchdb.find() should not return design-docs', async () => {
...
// Now I pass, too
}If I add debug logging to const pouchdbDebug = require('pouchdb-debug');
PouchDB.plugin(pouchdbDebug);
PouchDB.debug.enable('pouchdb:*');... it seems like the closing a database in the passing test causes the failing test database to stop responding. pouchdb:api my-failing-test-mrview-e45c095c4e756d5f91187a3809e62305 bulkDocs { docs: [ { _id: '_local/lastSeq', seq: 1 } ] } +1ms
pouchdb:api foobar23-my-passing-test get success {
value: 5,
_id: 'foobar23',
_rev: '1-14af8c9a835820969a8a273b18783a70'
} +0ms
pouchdb:api foobar23-my-passing-test close +0ms
pouchdb:api foobar23-my-passing-test close success undefined +0ms
✔ must be able to insert->update->delete via new_edits:false
1) pouchdb.find() should not return design-docsMy best guess is that there was a change to the |
Owner
Author
|
Fixed in #3807 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains:
Describe the problem you have without this PR
Todos