From acac3cc285f0774dc59216f5428b06e626e8ece4 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Wed, 20 Oct 2021 15:27:18 -0400 Subject: [PATCH] Fixing org.opensearch.repositories.azure.AzureBlobContainerRetriesTests and org.opensearch.action.admin.cluster.node.stats.NodeStatsTests (#1390) Signed-off-by: Andriy Redko --- plugins/repository-azure/build.gradle | 8 ++++---- .../licenses/reactor-core-3.4.10.jar.sha1 | 1 - .../licenses/reactor-core-3.4.11.jar.sha1 | 1 + .../licenses/reactor-netty-1.0.11.jar.sha1 | 1 - .../licenses/reactor-netty-1.0.12.jar.sha1 | 1 + .../licenses/reactor-netty-core-1.0.11.jar.sha1 | 1 - .../licenses/reactor-netty-core-1.0.12.jar.sha1 | 1 + .../licenses/reactor-netty-http-1.0.11.jar.sha1 | 1 - .../licenses/reactor-netty-http-1.0.12.jar.sha1 | 1 + .../azure/AzureBlobContainerRetriesTests.java | 2 +- .../action/admin/cluster/node/stats/NodeStatsTests.java | 8 ++++---- 11 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 plugins/repository-azure/licenses/reactor-core-3.4.10.jar.sha1 create mode 100644 plugins/repository-azure/licenses/reactor-core-3.4.11.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/reactor-netty-1.0.11.jar.sha1 create mode 100644 plugins/repository-azure/licenses/reactor-netty-1.0.12.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/reactor-netty-core-1.0.11.jar.sha1 create mode 100644 plugins/repository-azure/licenses/reactor-netty-core-1.0.12.jar.sha1 delete mode 100644 plugins/repository-azure/licenses/reactor-netty-http-1.0.11.jar.sha1 create mode 100644 plugins/repository-azure/licenses/reactor-netty-http-1.0.12.jar.sha1 diff --git a/plugins/repository-azure/build.gradle b/plugins/repository-azure/build.gradle index 8bd83868420..71356129845 100644 --- a/plugins/repository-azure/build.gradle +++ b/plugins/repository-azure/build.gradle @@ -56,10 +56,10 @@ dependencies { implementation project(':modules:transport-netty4') api 'com.azure:azure-storage-blob:12.13.0' api 'org.reactivestreams:reactive-streams:1.0.3' - api 'io.projectreactor:reactor-core:3.4.10' - api 'io.projectreactor.netty:reactor-netty:1.0.11' - api 'io.projectreactor.netty:reactor-netty-core:1.0.11' - api 'io.projectreactor.netty:reactor-netty-http:1.0.11' + api 'io.projectreactor:reactor-core:3.4.11' + api 'io.projectreactor.netty:reactor-netty:1.0.12' + api 'io.projectreactor.netty:reactor-netty-core:1.0.12' + api 'io.projectreactor.netty:reactor-netty-http:1.0.12' api "org.slf4j:slf4j-api:${versions.slf4j}" api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" diff --git a/plugins/repository-azure/licenses/reactor-core-3.4.10.jar.sha1 b/plugins/repository-azure/licenses/reactor-core-3.4.10.jar.sha1 deleted file mode 100644 index 5e90c04d599..00000000000 --- a/plugins/repository-azure/licenses/reactor-core-3.4.10.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -4fac3e29002904d750987aeb6249ff1cd47c5fd5 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-core-3.4.11.jar.sha1 b/plugins/repository-azure/licenses/reactor-core-3.4.11.jar.sha1 new file mode 100644 index 00000000000..fc0911be8fe --- /dev/null +++ b/plugins/repository-azure/licenses/reactor-core-3.4.11.jar.sha1 @@ -0,0 +1 @@ +0e305f6aa6e6da26aa42726f8cfd69b6ab53d7c0 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-1.0.11.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-1.0.11.jar.sha1 deleted file mode 100644 index 640d7dcc7a5..00000000000 --- a/plugins/repository-azure/licenses/reactor-netty-1.0.11.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -3af49856e8ad9fe47a741afa7f56601e61723e1d \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-1.0.12.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-1.0.12.jar.sha1 new file mode 100644 index 00000000000..e072c974ac1 --- /dev/null +++ b/plugins/repository-azure/licenses/reactor-netty-1.0.12.jar.sha1 @@ -0,0 +1 @@ +4765023130d1dc1e8ec3e5e7842564953cf549db \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-core-1.0.11.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-core-1.0.11.jar.sha1 deleted file mode 100644 index caab9763ae7..00000000000 --- a/plugins/repository-azure/licenses/reactor-netty-core-1.0.11.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -cfb3a45b62945a46a45a50050ec3b7ae8f5272f6 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-core-1.0.12.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-core-1.0.12.jar.sha1 new file mode 100644 index 00000000000..16e86450c14 --- /dev/null +++ b/plugins/repository-azure/licenses/reactor-netty-core-1.0.12.jar.sha1 @@ -0,0 +1 @@ +2b5b9fee56a6e492db277cd27e8baa7e1988e3cd \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-http-1.0.11.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-http-1.0.11.jar.sha1 deleted file mode 100644 index 1b6dff1315f..00000000000 --- a/plugins/repository-azure/licenses/reactor-netty-http-1.0.11.jar.sha1 +++ /dev/null @@ -1 +0,0 @@ -70dbc1f1c47e50f910c192928025621ed3d280d7 \ No newline at end of file diff --git a/plugins/repository-azure/licenses/reactor-netty-http-1.0.12.jar.sha1 b/plugins/repository-azure/licenses/reactor-netty-http-1.0.12.jar.sha1 new file mode 100644 index 00000000000..dc1f350c360 --- /dev/null +++ b/plugins/repository-azure/licenses/reactor-netty-http-1.0.12.jar.sha1 @@ -0,0 +1 @@ +494c9d45bc4de180e2eb911d1af7077c80740276 \ No newline at end of file diff --git a/plugins/repository-azure/src/test/java/org/opensearch/repositories/azure/AzureBlobContainerRetriesTests.java b/plugins/repository-azure/src/test/java/org/opensearch/repositories/azure/AzureBlobContainerRetriesTests.java index ce1f7c23345..3aeee7773cc 100644 --- a/plugins/repository-azure/src/test/java/org/opensearch/repositories/azure/AzureBlobContainerRetriesTests.java +++ b/plugins/repository-azure/src/test/java/org/opensearch/repositories/azure/AzureBlobContainerRetriesTests.java @@ -152,7 +152,7 @@ public class AzureBlobContainerRetriesTests extends OpenSearchTestCase { + InetAddresses.toUriString(address.getAddress()) + ":" + address.getPort() + "/"; clientSettings.put(ENDPOINT_SUFFIX_SETTING.getConcreteSettingForNamespace(clientName).getKey(), endpoint); clientSettings.put(MAX_RETRIES_SETTING.getConcreteSettingForNamespace(clientName).getKey(), maxRetries); - clientSettings.put(TIMEOUT_SETTING.getConcreteSettingForNamespace(clientName).getKey(), TimeValue.timeValueMillis(1000)); + clientSettings.put(TIMEOUT_SETTING.getConcreteSettingForNamespace(clientName).getKey(), TimeValue.timeValueMillis(2000)); final MockSecureSettings secureSettings = new MockSecureSettings(); secureSettings.setString(ACCOUNT_SETTING.getConcreteSettingForNamespace(clientName).getKey(), "account"); diff --git a/server/src/test/java/org/opensearch/action/admin/cluster/node/stats/NodeStatsTests.java b/server/src/test/java/org/opensearch/action/admin/cluster/node/stats/NodeStatsTests.java index 289d39804b9..85f798f02f8 100644 --- a/server/src/test/java/org/opensearch/action/admin/cluster/node/stats/NodeStatsTests.java +++ b/server/src/test/java/org/opensearch/action/admin/cluster/node/stats/NodeStatsTests.java @@ -69,8 +69,7 @@ import java.util.stream.StreamSupport; import static java.util.Collections.emptyMap; import static java.util.Collections.emptySet; import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.collection.IsEmptyCollection.empty; +import static org.hamcrest.collection.IsCollectionWithSize.hasSize; public class NodeStatsTests extends OpenSearchTestCase { public void testSerialization() throws IOException { @@ -180,8 +179,9 @@ public class NodeStatsTests extends OpenSearchTestCase { final Map deserializedPools = StreamSupport.stream(deserializedMem.spliterator(), false) .collect(Collectors.toMap(JvmStats.MemoryPool::getName, Function.identity())); - assertThat(pools.keySet(), not(empty())); - assertThat(deserializedPools.keySet(), not(empty())); + final int poolsCount = (int) StreamSupport.stream(nodeStats.getJvm().getMem().spliterator(), false).count(); + assertThat(pools.keySet(), hasSize(poolsCount)); + assertThat(deserializedPools.keySet(), hasSize(poolsCount)); for (final Map.Entry entry : pools.entrySet()) { assertThat(deserializedPools.containsKey(entry.getKey()), is(true));