Adopt core that `_flush` and `_force_merge` doesn't refresh anymore (elastic/x-pack-elasticsearch#2752)

Relates to elastic/elasticsearch#27000

Original commit: elastic/x-pack-elasticsearch@52e9951094
This commit is contained in:
Simon Willnauer 2017-10-16 10:16:50 +02:00 committed by GitHub
parent 84b00995e3
commit 2d1ce76194
6 changed files with 5 additions and 18 deletions

View File

@ -101,6 +101,7 @@ public class GraphTests extends XPackSingleNodeTestCase {
// issue https://github.com/elastic/x-pack-elasticsearch/issues/918
ForceMergeResponse actionGet = client().admin().indices().prepareForceMerge("test").setFlush(true).setMaxNumSegments(1)
.execute().actionGet();
client().admin().indices().prepareRefresh("test").get();
assertAllSuccessful(actionGet);
for (IndexShardSegments seg : client().admin().indices().prepareSegments().get().getIndices().get("test")) {
ShardSegments[] shards = seg.getShards();

View File

@ -99,7 +99,7 @@ public class HistoryIntegrationTests extends AbstractWatcherIntegrationTestCase
ensureWatcherStarted();
watcherClient().prepareExecuteWatch("test_watch").setRecordExecution(true).get();
flush(".watcher-history*");
refresh(".watcher-history*");
SearchResponse searchResponse = client().prepareSearch(".watcher-history*").setSize(0).get();
assertHitCount(searchResponse, 1);
@ -137,7 +137,7 @@ public class HistoryIntegrationTests extends AbstractWatcherIntegrationTestCase
watcherClient().prepareExecuteWatch("test_watch").setRecordExecution(true).get();
flush(".watcher-history*");
refresh(".watcher-history*");
SearchResponse searchResponse = client().prepareSearch(".watcher-history*").setSize(0).get();
assertHitCount(searchResponse, 1);

View File

@ -53,7 +53,7 @@ setup:
body: {"f1": "v8_mixed", "f2": 12}
- do:
indices.flush:
indices.refresh:
index: test_index
- do:
@ -81,7 +81,7 @@ setup:
id: d12
- do:
indices.flush:
indices.refresh:
index: test_index
---

View File

@ -24,10 +24,6 @@
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"f1": "v5_old", "f2": 4}'
- do:
indices.flush:
index: test_index
- do:
search:
index: test_index

View File

@ -65,12 +65,6 @@
- '{"index": {"_index": "token_index", "_type": "doc", "_id" : "5"}}'
- '{"f1": "v5_old", "f2": 4}'
- do:
headers:
Authorization: Bearer ${token}
indices.flush:
index: token_index
- do:
headers:
Authorization: Bearer ${token}

View File

@ -29,10 +29,6 @@
- '{"index": {"_index": "test_index", "_type": "test_type"}}'
- '{"f1": "v5_upgraded", "f2": 14}'
- do:
indices.flush:
index: test_index
- do:
search:
index: test_index