Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
yzqzss committed Aug 6, 2024
1 parent 95af078 commit 9bdeb1d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/pkg/queue/enqueue_test.go
Original file line number Diff line number Diff line change
@@ -89,6 +89,7 @@ func TestEnqueue(t *testing.T) {
ElementsPerHost := q.GetElementsPerHost()
q.statsMutex.Lock()
defer q.statsMutex.Unlock()

if (*ElementsPerHost)["example.fr"] != 2 {
t.Fatalf("Expected ElementsPerHost[example.fr] to be 2, got %d", (*ElementsPerHost)["example.fr"])
}
@@ -254,6 +255,8 @@ func TestBatchEnqueue(t *testing.T) {

ElementsPerHost := q.GetElementsPerHost()
q.statsMutex.Lock()
defer q.statsMutex.Unlock()

if (*ElementsPerHost)["example.fr"] != 1 {
t.Fatalf("Expected ElementsPerHost[example.fr] to be 1, got %d", (*ElementsPerHost)["example.fr"])
}
@@ -304,6 +307,8 @@ func TestBatchEnqueue(t *testing.T) {

ElementsPerHost := q.GetElementsPerHost()
q.statsMutex.Lock()
defer q.statsMutex.Unlock()

if (*ElementsPerHost)["example.fr"] != 2 {
t.Fatalf("Expected ElementsPerHost[example.fr] to be 2, got %d", (*ElementsPerHost)["example.fr"])
}

0 comments on commit 9bdeb1d

Please sign in to comment.