Skip to content

Commit d7ab1c3

Browse files
committed
FFM-11660 Fix tests
1 parent 2b0db10 commit d7ab1c3

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

analyticsservice/safe_maps_test.go

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"reflect"
66
"sync"
77
"testing"
8-
"time"
98

109
"github.com/harness/ff-golang-server-sdk/evaluation"
1110
)
@@ -173,32 +172,5 @@ func TestSafeSeenTargets(t *testing.T) {
173172
t.Errorf("Map size should be 0 after clearing, got %d", s.size())
174173
}
175174
})
176-
177-
// Add test for clearing based on interval
178-
t.Run("IntervalClearingTest", func(t *testing.T) {
179-
// Re-initialize the map with a clearing interval
180-
s = newSafeSeenTargets(10)
181-
182-
for key, value := range testData {
183-
s.set(key, value)
184-
}
185-
186-
// Ensure the map has items initially
187-
if s.size() != len(testData) {
188-
t.Errorf("Expected map size to be %d, got %d", len(testData), s.size())
189-
}
190-
191-
// Wait for the clearing to clear the map
192-
time.Sleep(300 * time.Millisecond)
193-
194-
// Ensure the map is cleared after the interval
195-
if s.size() != 0 {
196-
t.Errorf("Expected map size to be 0 after clearing interval, got %d", s.size())
197-
}
198-
199-
// Ensure the limitExceeded flag is reset
200-
if s.isLimitExceeded() {
201-
t.Errorf("Expected limitExceeded to be reset after clearing")
202-
}
203-
})
175+
204176
}

0 commit comments

Comments
 (0)