Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedabu98 committed Sep 25, 2024
1 parent 4dca0e2 commit 9efd46a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public void testKeepSchemaFields() {
@Test
public void testDropNestedFieldsFails() {
thrown.expect(IllegalArgumentException.class);
thrown.expectMessage("RowFilter does not support specifying nested fields to drop");
thrown.expectMessage("'drop' does not support nested fields");

new RowFilter(ROW_SCHEMA)
.dropping(
Expand All @@ -270,7 +270,7 @@ public void testDropNestedFieldsFails() {
@Test
public void testKeepNestedFieldsFails() {
thrown.expect(IllegalArgumentException.class);
thrown.expectMessage("RowFilter does not support specifying nested fields to keep");
thrown.expectMessage("'keep' does not support nested fields");

new RowFilter(ROW_SCHEMA)
.keeping(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ public void testInvalidRowThrowsHelpfulError() {
thrown.expect(IllegalArgumentException.class);
thrown.expectMessage("Invalid row does not contain field 'str'.");

interpolator.interpolate(ValueInSingleWindow.of(invalidRow, null, null, null));
interpolator.interpolate(
ValueInSingleWindow.of(
invalidRow, new Instant(0), GlobalWindow.INSTANCE, PaneInfo.NO_FIRING));
}

@Test
Expand Down Expand Up @@ -156,7 +158,9 @@ public void testDoublyNestedInterpolation() {
"foo {str}, bar {row.nested_row.doubly_nested_str}, baz {row.nested_row.doubly_nested_int}";
RowStringInterpolator interpolator = new RowStringInterpolator(template, ROW_SCHEMA);

String output = interpolator.interpolate(ValueInSingleWindow.of(ROW, null, null, null));
String output =
interpolator.interpolate(
ValueInSingleWindow.of(ROW, new Instant(0), GlobalWindow.INSTANCE, PaneInfo.NO_FIRING));

assertEquals("foo str_value, bar doubly_nested_str_value, baz 789", output);
}
Expand Down

0 comments on commit 9efd46a

Please sign in to comment.