fix smoke test

This commit is contained in:
Jörg Prante 2019-05-06 11:51:35 +02:00
parent 49b35226c2
commit 793cda09b1
3 changed files with 5 additions and 3 deletions

View file

@ -54,6 +54,7 @@ class SmokeTest {
client.newIndex(indexDefinition);
client.index(indexDefinition.getFullIndexName(), "1", true, "{ \"name\" : \"Hello World\"}");
client.flush();
client.waitForResponses(30, TimeUnit.SECONDS);
client.updateReplicaLevel(indexDefinition, 2);
int replica = client.getReplicaLevel(indexDefinition);
assertEquals(2, replica);

View file

@ -6,7 +6,7 @@
</Console>
</appenders>
<Loggers>
<Root level="debug">
<Root level="info">
<AppenderRef ref="Console" />
</Root>
</Loggers>

View file

@ -36,6 +36,9 @@ class SmokeTest {
assertEquals(helper.getClusterName(), client.getClusterName());
client.newIndex("test");
client.index("test", "1", true, "{ \"name\" : \"Hello World\"}"); // single doc ingest
client.flush();
client.waitForResponses(30, TimeUnit.SECONDS);
client.checkMapping("test");
client.update("test", "1", "{ \"name\" : \"Another name\"}");
client.delete("test", "1");
client.flush();
@ -43,13 +46,11 @@ class SmokeTest {
client.waitForRecovery("test", 10L, TimeUnit.SECONDS);
client.delete("test", "1");
client.flush();
client.checkMapping("test");
client.deleteIndex("test");
IndexDefinition indexDefinition = client.buildIndexDefinitionFromSettings("test", Settings.builder()
.build());
assertEquals(0, indexDefinition.getReplicaLevel());
client.newIndex(indexDefinition);
client.waitForRecovery(indexDefinition.getFullIndexName(), 30L, TimeUnit.SECONDS);
client.index(indexDefinition.getFullIndexName(), "1", true, "{ \"name\" : \"Hello World\"}");
client.flush();
client.waitForResponses(30, TimeUnit.SECONDS);