From 5e76b2fe3008c262d065d587459d32f53e448bdf Mon Sep 17 00:00:00 2001 From: Suraj Singh Date: Wed, 17 May 2023 14:23:13 -0700 Subject: [PATCH] PR feedback and cleanup Signed-off-by: Suraj Singh --- .../test/java/org/opensearch/backwards/IndexingIT.java | 9 --------- .../test/java/org/opensearch/upgrades/IndexingIT.java | 3 ++- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java b/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java index 9808aea4f79e9..048024bebcdd7 100644 --- a/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java +++ b/qa/mixed-cluster/src/test/java/org/opensearch/backwards/IndexingIT.java @@ -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. @@ -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(), @@ -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 @@ -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(), diff --git a/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/IndexingIT.java b/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/IndexingIT.java index 4d965ce4ff8fe..689c9acd8fb73 100644 --- a/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/IndexingIT.java +++ b/qa/rolling-upgrade/src/test/java/org/opensearch/upgrades/IndexingIT.java @@ -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\"}");