test: refresh only once to workaround phrase suggester edge case

Relates to elastic/x-pack-elasticsearch#2804

Original commit: elastic/x-pack-elasticsearch@3f2b6b7eea
This commit is contained in:
Martijn van Groningen 2017-10-27 15:05:18 +02:00
parent f74e680142
commit 96b0b4e96d
1 changed files with 6 additions and 1 deletions

View File

@ -139,6 +139,7 @@ public class DocumentLevelSecurityTests extends SecurityIntegTestCase {
return Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
.put(XPackSettings.DLS_FLS_ENABLED.getKey(), true)
.put(XPackSettings.AUDIT_ENABLED.getKey(), false) // Just to make logs less noisy
.build();
}
@ -956,7 +957,11 @@ public class DocumentLevelSecurityTests extends SecurityIntegTestCase {
public void testSuggesters() throws Exception {
assertAcked(client().admin().indices().prepareCreate("test")
.setSettings(Settings.builder().put("index.number_of_shards", 1))
.setSettings(Settings.builder()
.put("index.number_of_shards", 1)
.put("index.number_of_replicas", 0)
.put("index.refresh_interval", -1)
)
.addMapping("type1", "field1", "type=text", "suggest_field1", "type=text", "suggest_field2", "type=completion")
);