Skip to content

Commit f53f858

Browse files
committed
[add] Included extra test to cover all DropIndex() conditions
1 parent 29c5f26 commit f53f858

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

redisearch/client_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,14 @@ func TestClient_DropIndex(t *testing.T) {
943943

944944
// Create index again
945945
err = c.CreateIndexWithIndexDefinition(schema, indexDefinition)
946+
947+
// Wait for all documents to be indexed again
948+
info, _ = c.Info()
949+
for info.IsIndexing {
950+
time.Sleep(time.Second)
951+
info, _ = c.Info()
952+
}
953+
946954
assert.Nil(t, err)
947955
// Drop index but keep docs
948956
err = c.DropIndex(true)

0 commit comments

Comments
 (0)