The client list test for the last-seen time fails when the clock ticks between two reads #387

Closed
opened 2026-11-12 14:44:58 -05:00 by claude · 0 comments
Owner

One admin console test failed in the push run 1490 (feature/384-web-tests-udp-free-port, a comment-only C# commit): 1 of 1648. Seen once. Test code only.

Failure

  • client-list.component.spec.ts:231: Expected '4 min ago' to be '5 min ago'.

Cause

  • The fixture's lastSeenUtc getter returns "now minus exactly five minutes" each time it is read. The component takes its own now first and reads the getter while it maps the rows. When the clock ticks one millisecond between the two, the elapsed time is 299.999 s, which formatRelativeTime floors to 299 s and shows as "4 min ago".

Fix

  • The getter returns five minutes and 30 seconds ago, so a read slightly before or after the component's clock still gives "5 min ago".
One admin console test failed in the push run 1490 (`feature/384-web-tests-udp-free-port`, a comment-only C# commit): 1 of 1648. Seen once. Test code only. **Failure** - `client-list.component.spec.ts:231`: `Expected '4 min ago' to be '5 min ago'.` **Cause** - The fixture's `lastSeenUtc` getter returns "now minus exactly five minutes" each time it is read. The component takes its own `now` first and reads the getter while it maps the rows. When the clock ticks one millisecond between the two, the elapsed time is 299.999 s, which `formatRelativeTime` floors to 299 s and shows as "4 min ago". **Fix** - The getter returns five minutes and 30 seconds ago, so a read slightly before or after the component's clock still gives "5 min ago".
Sign in to join this conversation.
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
lantea-one/ninlil#387
No description provided.