Commit Graph
8 Commits
Author SHA1 Message Date
Cédric Krier 45946c23ef Wait up to 10 seconds for cache sync in tests
On busy host, it may require some time to receive the notification.

issue8198
review269141003
2019-03-16 14:56:32 +01:00
Cédric Krier e5e92ac81a Allow to use channel to synchronize Cache
When the clear timeout of the cache is zero, we launch a thread to synchronize
caches if the back-end support channels.
The thread is started on the first call to sync for the database.
The channel is also used to clear the cache of the process initiating the
clearing. This allows to test the mechanism is working with a single process.
So there will be a small delay even on single instance.

issue8027
review68431002
2019-03-09 17:03:38 +01:00
Cédric Krier c4ddbb064a Prevent filling cache with data from old transaction
Once the cache has been cleared, we must ensure that transaction started
before the clearing cannot fill the global cache.

issue8019
review56541002
2019-03-02 23:11:14 +01:00
Cédric Krier 9eaac0f3a3 Cast timestamp as datetime for sqlite back-end
SQLite backend returns a string for the datetime so the comparison between
timestamp fails.

issue8080
review48721002
2019-02-13 10:23:44 +01:00
Cédric Krier da24071467 Make Cache transactional
We implement sync, commit and rollback to follow transaction semantic.
When a transaction clears a cache, the global cache is cleared only when the
transaction is committed meanwhile the transaction will use a cache for itself
only.
We remove _nocache option because the sync, commit and rollback operate only
for the transaction.

issue7975
review53521002
2019-01-18 11:57:11 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier a6ffa18908 Add run-tests script and cleanup tests
issue2121
issue2420
review2491002
2014-01-12 19:58:22 +01:00
Cédric Krier 1e60085854 Use a better hashing method for context
repr doesn't guarantee to have always the same string

review642002
2013-02-04 19:59:05 +01:00