Skip to content

GH-3652: Use assertThat checks in parquet-format-structures/parquet-encoding/parquet-thrift tests#3650

Open
nastra wants to merge 1 commit into
apache:masterfrom
nastra:assertj-parquet-multiple
Open

GH-3652: Use assertThat checks in parquet-format-structures/parquet-encoding/parquet-thrift tests#3650
nastra wants to merge 1 commit into
apache:masterfrom
nastra:assertj-parquet-multiple

Conversation

@nastra

@nastra nastra commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Switching assertions from JUnit4-style Assert to AssertJ makes code easier to read and debug when tests fail.

What changes are included in this PR?

This updates parquet-format-structures / parquet-encoding / parquet-thrift tests to use AssertJ checks, which provide more fluent assertions and more detailed information when assertions fails on CI.

The changes in this PR were done with the help of Claude but I manually reviewed every single LOC

Are these changes tested?

yes, existing tests

Are there any user-facing changes?

no

job.setOutputFormatClass(NullOutputFormat.class);
}

protected void assertEqualsExcepted(List<StructWithUnionV2> expected, List<Object> found) throws Exception {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wasn't used anymore

@nastra nastra force-pushed the assertj-parquet-multiple branch from d65e6ab to 46ed57e Compare July 8, 2026 19:44
@nastra nastra force-pushed the assertj-parquet-multiple branch from 46ed57e to e62afcd Compare July 9, 2026 04:45
"base_info.nested.field",
"a.b.c.prexpost",
"a.b.c.prezapost");
assertThat(filter.keep("home.phone_number")).isTrue();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this way it's easier to spot which of the pattern is the cause if the test ever fails

@nastra

nastra commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

/cc @wgtmac @Fokko

@nastra nastra changed the title GH-3615: Use assertThat checks in parquet-format-structures/parquet-encoding/parquet-thrift tests GH-3652: Use assertThat checks in parquet-format-structures/parquet-encoding/parquet-thrift tests Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant