powersync-ja / react-native-quick-sqlite

Embedded SQLite with JSI bindings
MIT License
6 stars 2 forks source link

[Fix] Missing dependencies #9

Closed stevensJourney closed 1 year ago

stevensJourney commented 1 year ago

Dependencies

The package dependency for uuid was missing. This would cause an error when requesting locks if the host application did not include the uuid package.

Race Condition

The unit tests would intermittently fail in CI with no output. This was due to the unit "Manual Rollback" unit test omitting an await for tx.rollback(). The lock manager would wait for the work queue to empty before freeing the lock, but the mutex would not be notified, keeping the native connection state in an infinite loop. The mutex notification has been moved and a test has been added for cases where await is mistakingly ommited.