Skip to content

Commit 03f46ea

Browse files
committed
test: advance DuckDB fast-path fixture timestamps
DuckDB incremental push tests rewrite local sessions after the initial push watermark has advanced. Leaving fixture LocalModifiedAt values at their original timestamps meant those tests could skip the session selection path they were intended to exercise. Set fresh local modification times in the rewrite helpers so the follow-up incremental pushes deterministically cover the message-id repair and lifecycle fallback paths.
1 parent 2894ebe commit 03f46ea

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

internal/duckdb/sync_fastpath_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ func rewriteLocalMessagesPreservingContent(
424424
require.NotNil(t, sess)
425425
msgs, err := local.GetAllMessages(ctx, sessionID)
426426
require.NoError(t, err)
427+
modifiedAt := time.Now().UTC().Format(localSyncTimestampLayout)
428+
sess.LocalModifiedAt = &modifiedAt
427429
sess.MessageCount = len(msgs)
428430
_, err = local.WriteSessionBatchAtomic([]db.SessionBatchWrite{{
429431
Session: *sess,
@@ -497,6 +499,8 @@ func writeFastPathLifecycleSession(
497499
sessionID, "alpha", "lifecycle first",
498500
"2026-01-21T00:00:00.000Z", len(messages),
499501
)
502+
modifiedAt := time.Now().UTC().Format(localSyncTimestampLayout)
503+
sess.LocalModifiedAt = &modifiedAt
500504
write := db.SessionBatchWrite{
501505
Session: sess,
502506
Messages: messages,

0 commit comments

Comments
 (0)