Skip to content

Commit f6b40d9

Browse files
committed
Fix test problems
1 parent 7391c88 commit f6b40d9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pkg/phlaredb/head_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ func TestHeadIngestStacktraces(t *testing.T) {
240240
ctx := context.Background()
241241
head := newTestHead(t)
242242

243-
require.NoError(t, head.Ingest(ctx, newProfileFoo(), uuid.New()))
244-
require.NoError(t, head.Ingest(ctx, newProfileBar(), uuid.New()))
245-
require.NoError(t, head.Ingest(ctx, newProfileBar(), uuid.New()))
243+
require.NoError(t, head.Ingest(ctx, newProfileFoo(), uuid.MustParse("00000000-0000-0000-0000-00000000000a")))
244+
require.NoError(t, head.Ingest(ctx, newProfileBar(), uuid.MustParse("00000000-0000-0000-0000-00000000000b")))
245+
require.NoError(t, head.Ingest(ctx, newProfileBar(), uuid.MustParse("00000000-0000-0000-0000-00000000000c")))
246246

247247
// expect 2 mappings
248248
require.Equal(t, 2, len(head.mappings.slice))

pkg/phlaredb/profile_store_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ func sameProfileStream(i int) *testProfile {
5050
func readFullParquetFile[M any](t *testing.T, path string) ([]M, uint64) {
5151
f, err := os.Open(path)
5252
require.NoError(t, err)
53-
defer require.NoError(t, f.Close())
53+
defer func() {
54+
require.NoError(t, f.Close())
55+
}()
5456
stat, err := f.Stat()
5557
require.NoError(t, err)
5658

0 commit comments

Comments
 (0)