From 5aaf5ef13b8a47eca3eb424cfdb8bc7a044ec5fa Mon Sep 17 00:00:00 2001
From: Thomas Pelletier <thomas@pelletier.codes>
Date: Sun, 24 Apr 2022 18:50:54 -0400
Subject: [PATCH 710/710] Fix internal entry size test (#761)
The test meant to assert that the size of entry does not grow beyond
what it is today. 48 is the current size in bytes on x64. On 32-bit
platform that value should be less. As written the test was doing the
opposite comparison.
Fixes #760
---
internal/tracker/seen_test.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/internal/tracker/seen_test.go b/internal/tracker/seen_test.go
index 9f283f3..4f0515f 100644
--- a/internal/tracker/seen_test.go
+++ b/internal/tracker/seen_test.go
@@ -11,5 +11,6 @@ func TestEntrySize(t *testing.T) {
// Validate no regression on the size of entry{}. This is a critical bit for
// performance of unmarshaling documents. Should only be increased with care
// and a very good reason.
- require.LessOrEqual(t, 48, int(unsafe.Sizeof(entry{})))
+ maxExpectedEntrySize := 48
+ require.LessOrEqual(t, int(unsafe.Sizeof(entry{})), maxExpectedEntrySize)
}
--
2.35.1