Skip to content

Commit 96fdaea

Browse files
Spotless
Signed-off-by: Andy Kwok <[email protected]>
1 parent b7cda99 commit 96fdaea

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

core/src/test/java/org/opensearch/sql/expression/ip/GeoIPFunctionTest.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
package org.opensearch.sql.expression.ip;
77

88
import static org.junit.jupiter.api.Assertions.assertEquals;
9-
import static org.junit.jupiter.api.Assertions.assertNull;
109
import static org.junit.jupiter.api.Assertions.assertThrows;
1110
import static org.junit.jupiter.api.Assertions.assertTrue;
1211
import static org.opensearch.sql.data.type.ExprCoreType.BOOLEAN;
@@ -37,11 +36,16 @@ public void testGeoipFunctionSignature() {
3736
@Test
3837
public void testDefaultValueOf() {
3938
UnsupportedOperationException exception =
40-
assertThrows(
41-
UnsupportedOperationException.class,
42-
() ->
43-
DSL.geoip(DSL.literal("HARDCODED_DATASOURCE_NAME"), DSL.ref("ip_address", STRING))
44-
.valueOf(env));
45-
assertTrue(exception.getMessage().contains("OpenSearch defined function [geoip] is only supported in WHERE clause, HAVING clause and Eval operation."));
39+
assertThrows(
40+
UnsupportedOperationException.class,
41+
() ->
42+
DSL.geoip(DSL.literal("HARDCODED_DATASOURCE_NAME"), DSL.ref("ip_address", STRING))
43+
.valueOf(env));
44+
assertTrue(
45+
exception
46+
.getMessage()
47+
.contains(
48+
"OpenSearch defined function [geoip] is only supported in WHERE clause, HAVING"
49+
+ " clause and Eval operation."));
4650
}
4751
}

0 commit comments

Comments
 (0)