From 36a283c117d3b7371f736ad6f300c85834fcf545 Mon Sep 17 00:00:00 2001 From: "Richard T. Carback III" <rick.carback@gmail.com> Date: Mon, 12 Jun 2023 21:10:50 +0000 Subject: [PATCH] Fix the associated test w/ duplicate receives --- indexedDb/impl/channels/implementation_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/indexedDb/impl/channels/implementation_test.go b/indexedDb/impl/channels/implementation_test.go index 58cd04a1..386e5a77 100644 --- a/indexedDb/impl/channels/implementation_test.go +++ b/indexedDb/impl/channels/implementation_test.go @@ -413,13 +413,16 @@ func Test_wasmModel_DuplicateReceives(t *testing.T) { } // Store duplicate messages with same messageID + referenceID := uint64(0) for i := 0; i < 10; i++ { uuid = eventModel.ReceiveMessage(channelID, msgID, "test", testString+fmt.Sprintf("%d", i), []byte{8, 6, 7, 5}, 0, 0, netTime.Now(), time.Hour, rnd, 0, channels.Sent, false) - if uuid != 0 { - t.Fatalf("Expected UUID to be zero for duplicate receives") + if referenceID == 0 { + referenceID = uuid } + require.Equal(t, referenceID, uuid, + "UUID must be identical for duplicate receives") } }) } -- GitLab