fix failing tests

This commit is contained in:
javanna 2016-06-09 17:06:58 +02:00 committed by Luca Cavanna
parent 9a4971d3fd
commit d8c0fad08f
3 changed files with 4 additions and 4 deletions

View File

@ -53,7 +53,7 @@ public class HostsSnifferBuilderTests extends LuceneTestCase {
HostsSniffer.builder(client).setSniffRequestTimeoutMillis(RandomInts.randomIntBetween(random(), Integer.MIN_VALUE, 0));
fail("should have failed");
} catch(IllegalArgumentException e) {
assertEquals(e.getMessage(), "sniffRequestTimeout must be greater than 0");
assertEquals(e.getMessage(), "sniffRequestTimeoutMillis must be greater than 0");
}
HostsSniffer.Builder builder = HostsSniffer.builder(client);

View File

@ -58,14 +58,14 @@ public class SnifferBuilderTests extends LuceneTestCase {
Sniffer.builder(client, hostsSniffer).setSniffIntervalMillis(RandomInts.randomIntBetween(random(), Integer.MIN_VALUE, 0));
fail("should have failed");
} catch(IllegalArgumentException e) {
assertEquals("sniffInterval must be greater than 0", e.getMessage());
assertEquals("sniffIntervalMillis must be greater than 0", e.getMessage());
}
try {
Sniffer.builder(client, hostsSniffer).setSniffAfterFailureDelayMillis(RandomInts.randomIntBetween(random(), Integer.MIN_VALUE, 0));
fail("should have failed");
} catch(IllegalArgumentException e) {
assertEquals("sniffAfterFailureDelay must be greater than 0", e.getMessage());
assertEquals("sniffAfterFailureDelayMillis must be greater than 0", e.getMessage());
}
try (Sniffer sniffer = Sniffer.builder(client, hostsSniffer).build()) {

View File

@ -57,7 +57,7 @@ public class RestClientBuilderTests extends LuceneTestCase {
.setMaxRetryTimeoutMillis(RandomInts.randomIntBetween(random(), Integer.MIN_VALUE, 0));
fail("should have failed");
} catch(IllegalArgumentException e) {
assertEquals("maxRetryTimeout must be greater than 0", e.getMessage());
assertEquals("maxRetryTimeoutMillis must be greater than 0", e.getMessage());
}
try {