From c3b5e837516c8ab80da7e14bf84a21774ff24360 Mon Sep 17 00:00:00 2001 From: sang Date: Mon, 1 Jul 2024 11:23:29 +0800 Subject: [PATCH] fix: test get stream info expect entryId any of TestStreamTimestamps --- exporter/streams_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exporter/streams_test.go b/exporter/streams_test.go index 41746135..8fca1f28 100644 --- a/exporter/streams_test.go +++ b/exporter/streams_test.go @@ -88,11 +88,11 @@ func TestStreamsGetStreamInfo(t *testing.T) { if isNotTestTimestamp(info.LastGeneratedId) { t.Errorf("Stream LastGeneratedId mismatch.\nActual: %#v;\nExpected any of: %#v", info.LastGeneratedId, TestStreamTimestamps) } - if info.FirstEntryId != "" { - t.Errorf("Stream FirstEntryId mismatch.\nActual: %#v; - Expected empty", info.FirstEntryId) + if info.FirstEntryId != TestStreamTimestamps[0] { + t.Errorf("Stream FirstEntryId mismatch.\nActual: %#v;\nExpected any of: %#v", info.FirstEntryId, TestStreamTimestamps) } - if info.LastEntryId != "" { - t.Errorf("Stream LastEntryId mismatch.\nActual: %#v;\nExpected empty", info.LastEntryId) + if info.LastEntryId != TestStreamTimestamps[len(TestStreamTimestamps)-1] { + t.Errorf("Stream LastEntryId mismatch.\nActual: %#v;\nExpected any of: %#v", info.LastEntryId, TestStreamTimestamps) } if info.MaxDeletedEntryId != "" { t.Errorf("Stream MaxDeletedEntryId mismatch.\nActual: %#v;\nExpected: %#v", info.MaxDeletedEntryId, "0-0")