rdblue commented on code in PR #6029:
URL: https://github.com/apache/iceberg/pull/6029#discussion_r1001900312
##########
api/src/test/java/org/apache/iceberg/expressions/TestPredicateBinding.java:
##########
@@ -81,18 +81,12 @@ public void testMissingField() {
StructType struct = StructType.of(required(13, "x",
Types.IntegerType.get()));
UnboundPredicate<Integer> unbound = new UnboundPredicate<>(LT,
ref("missing"), 6);
- try {
- unbound.bind(struct);
- Assert.fail("Binding a missing field should fail");
- } catch (ValidationException e) {
- Assert.assertTrue(
- "Validation should complain about missing field",
- e.getMessage().contains("Cannot find field 'missing' in struct:"));
- }
+ Assertions.assertThatThrownBy(() -> unbound.bind(struct))
Review Comment:
Wow, this was so old it predated adding the `assertThrows` methods!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]