Commit 184750c9 authored by Jim Fulton's avatar Jim Fulton

Work around a beneficial race

When data are loaded, we notify waiting code before updating the cache.

This can confuse white-box tests that make assertions about the client
cache after a load, because the cache change may or may not have been
made yet.
parent 11eb9fd0
......@@ -114,9 +114,6 @@ If we access the root object, it'll be loaded from the server:
>>> conn.root()[1].x
6
>>> len(db.storage._cache)
2
Similarly, if we simply disconnect the client, and write data from
another client:
......@@ -138,8 +135,8 @@ another client:
- Drops or clears it's client cache. (The end result is that the cache
is working but empty.)
>>> len(db.storage._cache)
1
>>> len(db.storage._cache) <= 1
True
(When a database is created, it checks to make sure the root object is
in the database, which is why we get 1, rather than 0 objects in the cache.)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment