mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-28 02:48:38 +00:00
test: also assert deprecation warning after clusters have been closed.
This commit is contained in:
parent
1cb3a9d9dc
commit
621a1935b8
@ -220,6 +220,7 @@ public class InternalTestClusterTests extends ESTestCase {
|
||||
|
||||
assertClusters(cluster0, cluster1, false);
|
||||
long seed = randomLong();
|
||||
boolean shouldAssertSettingsDeprecationsAndWarnings = false;
|
||||
try {
|
||||
{
|
||||
Random random = new Random(seed);
|
||||
@ -231,6 +232,7 @@ public class InternalTestClusterTests extends ESTestCase {
|
||||
}
|
||||
assertArrayEquals(cluster0.getNodeNames(), cluster1.getNodeNames());
|
||||
if (cluster0.getNodeNames().length > 0) {
|
||||
shouldAssertSettingsDeprecationsAndWarnings = true;
|
||||
assertSettingDeprecationsAndWarnings(new Setting<?>[]{NetworkModule.HTTP_ENABLED});
|
||||
}
|
||||
Iterator<Client> iterator1 = cluster1.getClients().iterator();
|
||||
@ -245,6 +247,9 @@ public class InternalTestClusterTests extends ESTestCase {
|
||||
cluster1.afterTest();
|
||||
} finally {
|
||||
IOUtils.close(cluster0, cluster1);
|
||||
if (shouldAssertSettingsDeprecationsAndWarnings) {
|
||||
assertSettingDeprecationsAndWarnings(new Setting<?>[]{NetworkModule.HTTP_ENABLED});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user