Skip to content

Commit 34dac67

Browse files
chrisbobbeclaude
andcommitted
msglist test: Pin the clock in the date-separator test, to avoid DST flakes
This flake hasn't caused any failures I'm aware of; it's much rarer than the one fixed by PR zulip#2454, the flake that got our suite removed from Flutter's customer tests registry. But it's the same class of bug, discovered while fixing that other one, and the fix is simple. With PR zulip#2454 sent, this completes my Claude-powered sweep of DST-related test flakes. Verified with the clock at 2025-11-02 23:30 America/Los_Angeles: the test fails there before this change and passes after. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 7337141 commit 34dac67

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎test/model/message_list_test.dart‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3681,7 +3681,11 @@ void main() {
36813681
});
36823682

36833683
group('findItemWithMessageId', () {
3684-
test('has MessageListDateSeparatorItem with null message ID', () => awaitFakeAsync((async) async {
3684+
test('has MessageListDateSeparatorItem with null message ID', () => awaitFakeAsync(
3685+
// Pin the clock, to noon, so the message is definitely dated on the
3686+
// previous calendar day. (This avoids flakes involving a 25-hour day
3687+
// when clocks fall back for Daylight Saving Time.)
3688+
initialTime: DateTime(2035, 8, 21, 12), (async) async {
36853689
final stream = eg.stream();
36863690
final message = eg.streamMessage(stream: stream, topic: 'topic',
36873691
timestamp: eg.utcTimestamp(clock.daysAgo(1)));

0 commit comments

Comments
 (0)