rxdb icon indicating copy to clipboard operation
rxdb copied to clipboard

test: create state with cleaned up operation

Open enrico-teterra-maramalabs opened this issue 1 year ago • 1 comments

This PR contains:

a failing test

Describe the problem you have without this PR

to reproduce the issue:

  • have an rx-state on a database with a sqlite storage or other persisted storage
  • make more than 5 writes to trigger _cleanup to run on the state
  • recreate the database and reattach the state (restart the app)
  • an exception occurs

Can you make the test by only using the "normal" RxDB api without accessing the internal storageInstance? Atm this test does not seem to match you reproduction steps.

pubkey avatar Oct 16 '24 06:10 pubkey

yep no problem, please take a look at the test now

the test as it is now fails with:

+ expected - actual

       {
      -  "": {
      -    "foo": "bar6"
      -  }
         "foo": "bar6"
       }

Thank you for reporting. Fixed here https://github.com/pubkey/rxdb/pull/6564

pubkey avatar Nov 07 '24 09:11 pubkey