Skip to content

Commit 5dda98d

Browse files
committed
Standardize on expectThrows
1 parent 4d03454 commit 5dda98d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/ingest-common/src/test/java/org/elasticsearch/ingest/common/CefProcessorTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ public void testToTimestampWithFormattedDateWithoutTimezone() {
948948
public void testToTimestampWithInvalidDate() {
949949
CefParser parser = new CefParser(ZoneId.of("UTC"), false);
950950
String invalidDate = "invalid date";
951-
assertThrows(IllegalArgumentException.class, () -> parser.toTimestamp(invalidDate));
951+
expectThrows(IllegalArgumentException.class, () -> parser.toTimestamp(invalidDate));
952952
}
953953

954954
public void testToMacAddressWithSeparators() {
@@ -1004,7 +1004,7 @@ public void testToIPValidIPv6Address() {
10041004

10051005
public void testToIPInvalidIPAddress() {
10061006
CefParser parser = new CefParser(ZoneId.of("UTC"), true);
1007-
IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> parser.toIP("invalid_ip"));
1007+
IllegalArgumentException exception = expectThrows(IllegalArgumentException.class, () -> parser.toIP("invalid_ip"));
10081008
assertEquals("Invalid IP address format", exception.getMessage());
10091009
}
10101010

0 commit comments

Comments
 (0)