hoodiehq / pouchdb-hoodie-api

:dog: Hoodie-like API for PouchDB
https://hoodiehq.github.io/pouchdb-hoodie-api
Apache License 2.0
44 stars 11 forks source link

Tests fail with PouchDB@4.0.2 #78

Open gr2m opened 9 years ago

gr2m commented 9 years ago

follow up for https://github.com/hoodiehq/pouchdb-hoodie-api/pull/75#issuecomment-139851044

Just checked it locally and could reproduce it with PouchDB@4.0.2, but not with 4.0.1. @nickcolley are you looking into this already? It must have be something with the db.destroy() call here: https://github.com/hoodiehq/pouchdb-hoodie-api/blob/master/clear.js#L11

gr2m commented 9 years ago

fyi: https://github.com/pouchdb/pouchdb/issues/4339

NickColley commented 9 years ago

@gr2m think it's todo with the stateless constructor but yeah I ran into the same thing.

gr2m commented 9 years ago

Okay, so a way around this would be to re-initialize the db instance on destroy. In the hoodie API, we don't have the option to manually re-initialize the hoodie.store API, so it must happen auto-magically :tm:

No idea how though

gr2m commented 9 years ago

Is there a an alternative to db.destroy without performance issues in PouchDB?

NickColley commented 9 years ago

We have:

Unless we can implement purge I'd think we'd have to re instantiate the database ourselves.

NickColley commented 8 years ago

Okay, we throw an error in PouchDB now, so this will mean this test wont hang any more.

gr2m commented 8 years ago

could you check locally? Is the new PouchDB version out yet?

nolanlawson commented 8 years ago

No, it's not released yet. But 5.3.0 should have the fix.