test_system_dbfollow: the divergence record comparison straddles a clock second #129

Closed
opened 2026-10-09 13:57:47 -03:00 by marcos-mendez · 0 comments
marcos-mendez commented 2026-10-09 13:57:47 -03:00 (Migrated from github.com)

Seen on CI (tests / coverage, PR #128's run, 2026-10-09): test_an_old_primary_with_errant_gtids_stays_read_only_and_alerts failed with {'at': '...16:52:32Z'} != {'at': '...16:52:31Z'}.

keel.system.dbfollow._diverged rewrites the diverged record with a fresh at on every run. The test reads the record, runs follow a second time (which rewrites at), then asserts collect.divergence equals the first read. When the two runs straddle a clock-second boundary the timestamps differ and the test fails.

The property under test is that the second run keeps the record stable and alerts no more (that part is asserted separately). The comparison should not include at, which is by design "when the divergence was last seen".

Seen on CI (tests / coverage, PR #128's run, 2026-10-09): `test_an_old_primary_with_errant_gtids_stays_read_only_and_alerts` failed with {'at': '...16:52:32Z'} != {'at': '...16:52:31Z'}. `keel.system.dbfollow._diverged` rewrites the diverged record with a fresh `at` on every run. The test reads the record, runs `follow` a second time (which rewrites `at`), then asserts `collect.divergence` equals the first read. When the two runs straddle a clock-second boundary the timestamps differ and the test fails. The property under test is that the second run keeps the record stable and alerts no more (that part is asserted separately). The comparison should not include `at`, which is by design "when the divergence was last seen".
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Keel-Linux/keel#129
No description provided.