-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
report bug : data still there despite remove and destroy calls #3788
Conversation
Both, |
Ok thanks for these precisions. So my test can not be probant this way. As mentionned on Gitter, my initial trouble comes from my indexedDB that still has documents once |
I tried to reproduce the problem with this test, but it didn't have any error. /**
* @link https://github.com/pubkey/rxdb/pull/3788
*/
it('#3788 removing the collection should also remove all changes', async () => {
if (!config.storage.hasMultiInstance) {
return;
}
const dbName = randomCouchString();
const createDb = async () => {
const db = await createRxDatabase({
name: dbName,
storage: config.storage.getStorage(),
ignoreDuplicate: true
});
await db.addCollections({
human: { schema: schemas.human }
});
return db;
}
const db1 = await createDb();
await db1.collections.human.insert(schemaObjects.simpleHuman());
const db2 = await createDb();
// remove the collection on one database
await db1.human.remove();
/**
* Getting the changes in the other database should have an empty result.
*/
const changesResult = await db2.human.storageInstance.getChangedDocumentsSince(10);
console.dir(changesResult);
assert.strictEqual(changesResult.length, 0);
db1.destroy();
db2.destroy();
}); |
Also linked to dash in names 427e226#diff-e3288a7097a47ea2904142245c2895726f20a7be84914f4f4bb889b2adc4148bR589 |
Closing this PR. Fixed in ca6ea15 |
data still there despite remove and destroy calls