Skip to content

Commit 99911b6

Browse files
author
Peng Zhou
committed
Fix segmentation violation issue in test
1 parent ca3bf77 commit 99911b6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/e2e/clustering_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func TestClusterJoin(t *testing.T) {
7373

7474
numOfHosts := 0
7575
client := req.C()
76-
resp, err := client.R().
76+
_, err := client.R().
7777
SetDigestAuth(username, password).
7878
SetRetryCount(5).
7979
SetRetryFixedInterval(10 * time.Second).
@@ -85,14 +85,15 @@ func TestClusterJoin(t *testing.T) {
8585
totalHosts := gjson.Get(string(body), `host-default-list.list-items.list-count.value`)
8686
numOfHosts = int(totalHosts.Num)
8787
if numOfHosts != 2 {
88-
t.Log("Waiting for MarkLogic hosts")
88+
t.Log("Number of hosts: " + string(totalHosts.Raw))
89+
t.Log("Waiting for MarkLogic count of MarkLogic hosts to be 2")
8990
}
9091
return numOfHosts != 2
9192
}).
9293
Get("http://localhost:8002/manage/v2/hosts?format=json")
93-
defer resp.Body.Close()
9494

9595
if err != nil {
96+
t.Error("Error getting hosts")
9697
t.Fatalf(err.Error())
9798
}
9899

0 commit comments

Comments
 (0)