Skip to content

Commit 5bbc5cb

Browse files
committed
fix: update message ID generation in solution package tests to use temp directory base name
1 parent 8ede4b6 commit 5bbc5cb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/stages/packager/packager_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func TestPrepareSolutionPackage_Success(t *testing.T) {
3333
DiffResult: messages.FileLocation{Bucket: "results", Path: "results/1/diff.result"},
3434
}
3535
msg := &messages.TaskQueueMessage{SubmissionFile: submission, TestCases: []messages.TestCase{tc}}
36-
msgID := "pkg-test-1"
36+
msgID := filepath.Base(t.TempDir())
3737

3838
// expect DownloadFile for submission and test case files; destination path can be any
3939
mockStorage.EXPECT().DownloadFile(submission, gomock.Any()).Return("/tmp/dest-sub", nil)
@@ -223,7 +223,7 @@ func TestPrepareSolutionPackage_WithCacheHit(t *testing.T) {
223223
SubmissionFile: submission,
224224
TestCases: []messages.TestCase{tc},
225225
}
226-
msgID := "cache-hit-test"
226+
msgID := filepath.Base(t.TempDir())
227227

228228
// Create temp cached files
229229
cachedInputPath := filepath.Join(t.TempDir(), "cached_in.txt")
@@ -296,7 +296,7 @@ func TestPrepareSolutionPackage_WithCacheMiss(t *testing.T) {
296296
SubmissionFile: submission,
297297
TestCases: []messages.TestCase{tc},
298298
}
299-
msgID := "cache-miss-test"
299+
msgID := filepath.Base(t.TempDir())
300300

301301
// Expect submission download (not cached)
302302
mockStorage.EXPECT().DownloadFile(submission, gomock.Any()).Return("/tmp/dest-sub", nil)

0 commit comments

Comments
 (0)