test(recommendation): spread fixtures use hex track ids (#8216)
candBy scans the id into a UUID, so a title starting with 'o' failed to parse before the test ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -47,7 +47,7 @@ func TestSpreadArtists_TheSeedArtistDoesNotOpenTheRadioBackToBack(t *testing.T)
|
|||||||
// Twelve others: room for the seed artist's four songs each artistGap
|
// Twelve others: room for the seed artist's four songs each artistGap
|
||||||
// apart after the seed, as a 50-song radio capped at 6 per artist has.
|
// apart after the seed, as a 50-song radio capped at 6 per artist has.
|
||||||
for i := 0; i < 12; i++ {
|
for i := 0; i < 12; i++ {
|
||||||
picks = append(picks, candBy(t, fmt.Sprintf("o%011d", i), fmt.Sprintf("%012d", 100+i), fmt.Sprintf("%012d", 100+i), ScoringInputs{}))
|
picks = append(picks, candBy(t, fmt.Sprintf("e%011d", i), fmt.Sprintf("%012d", 100+i), fmt.Sprintf("%012d", 100+i), ScoringInputs{}))
|
||||||
}
|
}
|
||||||
seedArtist := artistOf(t, seed)
|
seedArtist := artistOf(t, seed)
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ func TestSpreadArtists_TheSeedArtistDoesNotOpenTheRadioBackToBack(t *testing.T)
|
|||||||
if bad := tooClose(spread, seedArtist); len(bad) > 0 {
|
if bad := tooClose(spread, seedArtist); len(bad) > 0 {
|
||||||
t.Errorf("%v play within %d songs of the same artist: %v", bad, artistGap, titles(spread))
|
t.Errorf("%v play within %d songs of the same artist: %v", bad, artistGap, titles(spread))
|
||||||
}
|
}
|
||||||
if got, want := titles(spread)[0], "o00000000000"; got != want {
|
if got, want := titles(spread)[0], "e00000000000"; got != want {
|
||||||
t.Errorf("first pick %s, want %s: the best pick by another artist", got, want)
|
t.Errorf("first pick %s, want %s: the best pick by another artist", got, want)
|
||||||
}
|
}
|
||||||
if !sameSongs(spread, picks) {
|
if !sameSongs(spread, picks) {
|
||||||
|
|||||||
Reference in New Issue
Block a user