rko281 / ReStoreForPharo

Relational database persistence for Pharo objects
MIT License
32 stars 7 forks source link

SQLite shared cache mode or URI naming #4

Closed PierceNg closed 4 years ago

PierceNg commented 4 years ago

My copy of the SQLite shared library happens to not have shared cache mode compiled in and has URI naming disabled. The tests created a file named 'file::memory:?cache=shared' in the filesystem. All tests pass.

If I run the tests with just :memory:, 315 tests erred.

With a regular file name like /tmp/rtest.db, all tests pass.

rko281 commented 4 years ago

This is expected behaviour - the SUnits use memory mode for speed, but need the shared cache since some tests rely on two concurrent connections to test refresh behaviour, update clash handling etc.

PierceNg commented 4 years ago

I rebuilt libsqlite.so with URI naming enabled. Running the tests again with URI file::memory:?cache=shared, no file with funny filename is created in the filesystem, and the test output is as follows:

1054 run, 1023 passes, 0 skipped, 25 expected failures, 0 failures, 6 errors, 0 unexpected passes
Failures:

Errors:
SSWReStoreSortTest>>#testClassSortImplementation
SSWReStoreSortTest>>#testClassSortImplementationOnPersistentObject
SSWReStoreSortTest>>#testDeepSort
SSWReStoreSortTest>>#testSortImplementation
SSWReStoreSortTest>>#testSortImplementationOnPersistentObject
SSWReStoreSortTest>>#testStandardSortOnPersistentObject
rko281 commented 4 years ago

These tests are running green for me with SQLite; could you provide an error stack for one of them please?

PierceNg commented 4 years ago

i just tried with a fresh 7.0.4 image. All tests pass. Maybe there was something wrong in the other image I used.

All good.