From 2f2573dd07a5727331b0d27b319b2080ffc1eaa2 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sat, 10 Oct 2026 22:23:16 -0400 Subject: [PATCH] fix: the re-tag test sets its clock one statement at a time, as a prepared statement takes only one (M502 #5579) Co-Authored-By: Claude Opus 5.5 --- internal/wanted/manual_test.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/internal/wanted/manual_test.go b/internal/wanted/manual_test.go index 21ea8d5e..7478fb8a 100644 --- a/internal/wanted/manual_test.go +++ b/internal/wanted/manual_test.go @@ -131,11 +131,16 @@ func TestListLibrary_MatchesARetaggedAlbum_Integration(t *testing.T) { AlbumID: untagged.ID, Outcome: "unmatched", Detail: "no match", Matcher: libraryMatcher}); err != nil { t.Fatal(err) } - if _, err := pool.Exec(ctx, ` - UPDATE albums SET created_at = now() - interval '2 hours' WHERE id = $1; - UPDATE tracks SET added_at = now() - interval '2 hours' WHERE album_id = $1; - UPDATE acquisition_settings SET library_listing_started_at = now() - interval '1 hour', - library_listed_at = now() - interval '1 hour', library_unlisted = 1`, untagged.ID); err != nil { + for _, stmt := range []string{ + `UPDATE albums SET created_at = now() - interval '2 hours' WHERE id = $1`, + `UPDATE tracks SET added_at = now() - interval '2 hours' WHERE album_id = $1`, + } { + if _, err := pool.Exec(ctx, stmt, untagged.ID); err != nil { + t.Fatal(err) + } + } + if _, err := pool.Exec(ctx, `UPDATE acquisition_settings SET library_listing_started_at = now() - interval '1 hour', + library_listed_at = now() - interval '1 hour', library_unlisted = 1`); err != nil { t.Fatal(err) } // The re-tag: the same tracks, under the album their new tags name.