diff --git a/packages/cultmesh-py/tests/test_remote_write_authority.py b/packages/cultmesh-py/tests/test_remote_write_authority.py index 7397577d..270b92fc 100644 --- a/packages/cultmesh-py/tests/test_remote_write_authority.py +++ b/packages/cultmesh-py/tests/test_remote_write_authority.py @@ -89,7 +89,11 @@ class NotificationStampTests(unittest.TestCase): subscriptions = {"s": _DatabaseSubscription("s", set(), set())} replies = server._handle_connection_message(put_of(KEY_A, "peer", stored_at=peer_stamp), subscriptions, peer=PEER) held = node.cache.get_required_envelope(NOTE, KEY_A).stored_at - self.assertGreater(held, local) + # A store restamps a replacing write later than the record it replaces; a store-less cache holds the peer's stamp. + if backing is None: + self.assertEqual(held, peer_stamp) + else: + self.assertGreater(held, local) self.assertEqual([reply["document"]["storedAt"] for reply in replies], [held]) self.assertEqual(node.database._shard_logs[SHARD_ID][-1]["put"]["document"]["storedAt"], held)