Fixing org.opensearch.repositories.azure.AzureBlobContainerRetriesTests and org.opensearch.action.admin.cluster.node.stats.NodeStatsTests (#1390)

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
This commit is contained in:
Andriy Redko 2021-10-20 15:27:18 -04:00 committed by GitHub
parent 284968bb85
commit acac3cc285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 13 additions and 13 deletions

View File

@ -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}"

View File

@ -1 +0,0 @@
4fac3e29002904d750987aeb6249ff1cd47c5fd5

View File

@ -0,0 +1 @@
0e305f6aa6e6da26aa42726f8cfd69b6ab53d7c0

View File

@ -1 +0,0 @@
3af49856e8ad9fe47a741afa7f56601e61723e1d

View File

@ -0,0 +1 @@
4765023130d1dc1e8ec3e5e7842564953cf549db

View File

@ -1 +0,0 @@
cfb3a45b62945a46a45a50050ec3b7ae8f5272f6

View File

@ -0,0 +1 @@
2b5b9fee56a6e492db277cd27e8baa7e1988e3cd

View File

@ -1 +0,0 @@
70dbc1f1c47e50f910c192928025621ed3d280d7

View File

@ -0,0 +1 @@
494c9d45bc4de180e2eb911d1af7077c80740276

View File

@ -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");

View File

@ -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<String, JvmStats.MemoryPool> 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<String, JvmStats.MemoryPool> entry : pools.entrySet()) {
assertThat(deserializedPools.containsKey(entry.getKey()), is(true));