Skip to content

Commit

Permalink
PR feedback and cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Suraj Singh <[email protected]>
  • Loading branch information
dreamer-89 committed May 17, 2023
1 parent ec67769 commit 5e76b2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ private void printClusterRouting() throws IOException, ParseException {
logger.info("cluster nodes: {}", clusterState);
}

private void printIndexSettings(String index) throws IOException, ParseException {
Request indexSettings = new Request("GET", index + "/_settings?pretty");
String idxSettings = EntityUtils.toString(client().performRequest(indexSettings).getEntity()).trim();
logger.info("idxSettings : {}", idxSettings);
}

/**
* This test verifies that segment replication does not break when primary shards are on lower OS version. It does this
* by verifying replica shards contains same number of documents as primary's.
Expand All @@ -134,7 +128,6 @@ public void testIndexingWithPrimaryOnBwcNodes() throws Exception {
final String index = "test-index";
createIndex(index, settings.build());
ensureYellow(index);
printIndexSettings(index);

int docCount = 200;
try (RestClient nodeClient = buildClient(restClientSettings(),
Expand All @@ -146,7 +139,6 @@ public void testIndexingWithPrimaryOnBwcNodes() throws Exception {
updateIndexSettings(index, Settings.builder().put("index.number_of_replicas", 2));

printClusterRouting();
printIndexSettings(index);
ensureGreen(index);

// Index docs
Expand Down Expand Up @@ -184,7 +176,6 @@ public void testIndexingWithReplicaOnBwcNodes() throws Exception {
createIndex(index, settings.build());
ensureYellow(index);
printClusterRouting();
printIndexSettings(index);

int docCount = 200;
try (RestClient nodeClient = buildClient(restClientSettings(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,9 @@ public void testIndexingWithSegRep() throws Exception {
assertCount(indexName, expectedCount);

if (CLUSTER_TYPE != ClusterType.OLD) {
logger.info("--> Index one doc (to be deleted next) and verify doc count");
logger.info("--> Bulk index 5 documents");
bulk(indexName, "_" + CLUSTER_TYPE, 5);
logger.info("--> Index one doc (to be deleted next) and verify doc count");
Request toBeDeleted = new Request("PUT", "/" + indexName + "/_doc/to_be_deleted");
toBeDeleted.addParameter("refresh", "true");
toBeDeleted.setJsonEntity("{\"f1\": \"delete-me\"}");
Expand Down

0 comments on commit 5e76b2f

Please sign in to comment.