Skip to content

Commit

Permalink
test: also assert deprecation warning after clusters have been closed.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvg committed Apr 19, 2018
1 parent 1cb3a9d commit 621a193
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ public Settings transportClientSettings() {

assertClusters(cluster0, cluster1, false);
long seed = randomLong();
boolean shouldAssertSettingsDeprecationsAndWarnings = false;
try {
{
Random random = new Random(seed);
Expand All @@ -231,6 +232,7 @@ public Settings transportClientSettings() {
}
assertArrayEquals(cluster0.getNodeNames(), cluster1.getNodeNames());
if (cluster0.getNodeNames().length > 0) {
shouldAssertSettingsDeprecationsAndWarnings = true;
assertSettingDeprecationsAndWarnings(new Setting<?>[]{NetworkModule.HTTP_ENABLED});
}
Iterator<Client> iterator1 = cluster1.getClients().iterator();
Expand All @@ -245,6 +247,9 @@ public Settings transportClientSettings() {
cluster1.afterTest();
} finally {
IOUtils.close(cluster0, cluster1);
if (shouldAssertSettingsDeprecationsAndWarnings) {
assertSettingDeprecationsAndWarnings(new Setting<?>[]{NetworkModule.HTTP_ENABLED});
}
}
}

Expand Down

0 comments on commit 621a193

Please sign in to comment.