fix smoke test
This commit is contained in:
parent
49b35226c2
commit
793cda09b1
3 changed files with 5 additions and 3 deletions
|
@ -54,6 +54,7 @@ class SmokeTest {
|
||||||
client.newIndex(indexDefinition);
|
client.newIndex(indexDefinition);
|
||||||
client.index(indexDefinition.getFullIndexName(), "1", true, "{ \"name\" : \"Hello World\"}");
|
client.index(indexDefinition.getFullIndexName(), "1", true, "{ \"name\" : \"Hello World\"}");
|
||||||
client.flush();
|
client.flush();
|
||||||
|
client.waitForResponses(30, TimeUnit.SECONDS);
|
||||||
client.updateReplicaLevel(indexDefinition, 2);
|
client.updateReplicaLevel(indexDefinition, 2);
|
||||||
int replica = client.getReplicaLevel(indexDefinition);
|
int replica = client.getReplicaLevel(indexDefinition);
|
||||||
assertEquals(2, replica);
|
assertEquals(2, replica);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
</Console>
|
</Console>
|
||||||
</appenders>
|
</appenders>
|
||||||
<Loggers>
|
<Loggers>
|
||||||
<Root level="debug">
|
<Root level="info">
|
||||||
<AppenderRef ref="Console" />
|
<AppenderRef ref="Console" />
|
||||||
</Root>
|
</Root>
|
||||||
</Loggers>
|
</Loggers>
|
||||||
|
|
|
@ -36,6 +36,9 @@ class SmokeTest {
|
||||||
assertEquals(helper.getClusterName(), client.getClusterName());
|
assertEquals(helper.getClusterName(), client.getClusterName());
|
||||||
client.newIndex("test");
|
client.newIndex("test");
|
||||||
client.index("test", "1", true, "{ \"name\" : \"Hello World\"}"); // single doc ingest
|
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.update("test", "1", "{ \"name\" : \"Another name\"}");
|
||||||
client.delete("test", "1");
|
client.delete("test", "1");
|
||||||
client.flush();
|
client.flush();
|
||||||
|
@ -43,13 +46,11 @@ class SmokeTest {
|
||||||
client.waitForRecovery("test", 10L, TimeUnit.SECONDS);
|
client.waitForRecovery("test", 10L, TimeUnit.SECONDS);
|
||||||
client.delete("test", "1");
|
client.delete("test", "1");
|
||||||
client.flush();
|
client.flush();
|
||||||
client.checkMapping("test");
|
|
||||||
client.deleteIndex("test");
|
client.deleteIndex("test");
|
||||||
IndexDefinition indexDefinition = client.buildIndexDefinitionFromSettings("test", Settings.builder()
|
IndexDefinition indexDefinition = client.buildIndexDefinitionFromSettings("test", Settings.builder()
|
||||||
.build());
|
.build());
|
||||||
assertEquals(0, indexDefinition.getReplicaLevel());
|
assertEquals(0, indexDefinition.getReplicaLevel());
|
||||||
client.newIndex(indexDefinition);
|
client.newIndex(indexDefinition);
|
||||||
client.waitForRecovery(indexDefinition.getFullIndexName(), 30L, TimeUnit.SECONDS);
|
|
||||||
client.index(indexDefinition.getFullIndexName(), "1", true, "{ \"name\" : \"Hello World\"}");
|
client.index(indexDefinition.getFullIndexName(), "1", true, "{ \"name\" : \"Hello World\"}");
|
||||||
client.flush();
|
client.flush();
|
||||||
client.waitForResponses(30, TimeUnit.SECONDS);
|
client.waitForResponses(30, TimeUnit.SECONDS);
|
||||||
|
|
Loading…
Reference in a new issue