-
Notifications
You must be signed in to change notification settings - Fork 319
Description
Currently, the tests for matrix-sdk-indexeddb
are only run against Firefox and not against Chrome (or any other browsers).
Furthermore, when running tests against Chrome, there are a number of failures. Note that some of these are tests of code that I introduced - i.e., those in matrix_sdk_indexeddb::event_cache_store
.
> wasm-pack test --chrome --headless -- crates/matrix-sdk-indexeddb
# -- snip --
failures:
state_store::encrypted_tests::statestore_integration_tests::test_topic_redaction_outer
state_store::migrations::tests::test_migrating_to_v4_outer
event_cache_store::tests::encrypted::indexeddb_event_cache_store_integration_tests::test_linked_chunk_replace_item
event_cache_store::tests::encrypted::indexeddb_event_cache_store_integration_tests::test_linked_chunk_remove_item
event_cache_store::tests::encrypted::indexeddb_event_cache_store_integration_tests::test_linked_chunk_detach_last_items
state_store::tests::statestore_integration_tests::test_topic_redaction_outer
event_cache_store::tests::unencrypted::indexeddb_event_cache_store_integration_tests::test_linked_chunk_replace_item
event_cache_store::tests::unencrypted::indexeddb_event_cache_store_integration_tests::test_linked_chunk_remove_item
event_cache_store::tests::unencrypted::indexeddb_event_cache_store_integration_tests::test_linked_chunk_detach_last_items
test result: FAILED. 168 passed; 9 failed; 2 ignored; 0 filtered out; finished in 19.61s
All of these fail due to errors with the use of cursors. The error messages are of the following form.
DomException { name: "InvalidStateError", message: "Failed to execute '<operation>' on 'IDBCursor': The cursor is being iterated or has iterated past its end.", code: 11 })
It's not clear exactly why this isn't portable, but I think it has to do with the version of the library being used for IndexedDB operations - i.e., indexed_db_futures
version 0.5.0
.
indexed_db_futures
has released some patches that fix race conditions in how cursors are handled and my guess is that upgrading our dependency will fix these tests. For details on the patches, see Alorel/rust-indexed-db#52.
I am not sure how much the API has changed since 0.5.0
, but I will look into what is required to update this.