From bc317a3d0d92502a86f90124e3b39196f2baff8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rg=20Prante?= Date: Fri, 22 May 2020 11:38:04 +0200 Subject: [PATCH] add smoke test fix for race condition between index deletion and bulk indexing --- elx-http/src/test/java/org/xbib/elx/http/test/SmokeTest.java | 1 + elx-node/src/test/java/org/xbib/elx/node/test/SmokeTest.java | 1 + .../src/test/java/org/xbib/elx/transport/test/SmokeTest.java | 1 + 3 files changed, 3 insertions(+) diff --git a/elx-http/src/test/java/org/xbib/elx/http/test/SmokeTest.java b/elx-http/src/test/java/org/xbib/elx/http/test/SmokeTest.java index d255c0a..d8063e0 100644 --- a/elx-http/src/test/java/org/xbib/elx/http/test/SmokeTest.java +++ b/elx-http/src/test/java/org/xbib/elx/http/test/SmokeTest.java @@ -54,6 +54,7 @@ class SmokeTest { bulkClient.index("test_smoke", "1", true, "{ \"name\" : \"Hello World\"}"); bulkClient.delete("test_smoke", "1"); bulkClient.flush(); + bulkClient.waitForResponses(30, TimeUnit.SECONDS); adminClient.deleteIndex("test_smoke"); bulkClient.newIndex(indexDefinition); bulkClient.index(indexDefinition.getFullIndexName(), "1", true, "{ \"name\" : \"Hello World\"}"); diff --git a/elx-node/src/test/java/org/xbib/elx/node/test/SmokeTest.java b/elx-node/src/test/java/org/xbib/elx/node/test/SmokeTest.java index af53da5..2a8892d 100644 --- a/elx-node/src/test/java/org/xbib/elx/node/test/SmokeTest.java +++ b/elx-node/src/test/java/org/xbib/elx/node/test/SmokeTest.java @@ -52,6 +52,7 @@ class SmokeTest { bulkClient.index("test_smoke", "1", true, "{ \"name\" : \"Hello World\"}"); bulkClient.delete("test_smoke", "1"); bulkClient.flush(); + bulkClient.waitForResponses(30, TimeUnit.SECONDS); adminClient.deleteIndex("test_smoke"); bulkClient.newIndex(indexDefinition); bulkClient.index(indexDefinition.getFullIndexName(), "1", true, "{ \"name\" : \"Hello World\"}"); diff --git a/elx-transport/src/test/java/org/xbib/elx/transport/test/SmokeTest.java b/elx-transport/src/test/java/org/xbib/elx/transport/test/SmokeTest.java index 509d8ad..e229369 100644 --- a/elx-transport/src/test/java/org/xbib/elx/transport/test/SmokeTest.java +++ b/elx-transport/src/test/java/org/xbib/elx/transport/test/SmokeTest.java @@ -54,6 +54,7 @@ class SmokeTest { bulkClient.index("test_smoke", "1", true, "{ \"name\" : \"Hello World\"}"); bulkClient.delete("test_smoke", "1"); bulkClient.flush(); + bulkClient.waitForResponses(30, TimeUnit.SECONDS); adminClient.deleteIndex("test_smoke"); bulkClient.newIndex(indexDefinition); bulkClient.index(indexDefinition.getFullIndexName(), "1", true, "{ \"name\" : \"Hello World\"}");