Ticket #23 (new defect)

Opened 21 months ago

TestCacheItem.test_item_state_transitions non-deterministic

Reported by: pjcoup@… Owned by: jajcus
Priority: minor Component: pyxmpp
Keywords: Cc:

Description

While minor, I have seen this test fail by "skipping" intermediate cache states which are expected to be visited during the test. To make the test completely reliable, we basically need to know the last "update time" for the cache item (expose the 'now' obtained in CacheItem?.update_state), and make sure the clock difference corresponds to the correct cache state. I'm attaching a sample diff for a new test and CacheItem? which exposes the last cache update time (although we probably shouldn't change the internals just to get the test to pass reliably).

Attachments

pyxmpp_cache.py.diff (1.3 KB) - added by pjcoup@… 21 months ago.
diff of pyxmpp/cache.py
tests_cache.py.diff (2.4 KB) - added by pjcoup@… 21 months ago.
diff of tests/cache.py

Change History

Changed 21 months ago by pjcoup@…

diff of pyxmpp/cache.py

Changed 21 months ago by pjcoup@…

diff of tests/cache.py

Add/Change #23 (TestCacheItem.test_item_state_transitions non-deterministic)

Author


E-mail address and user name can be saved in the Preferences.


Action
as new
 
Note: See TracTickets for help on using tickets.