[
https://issues.apache.org/jira/browse/HADOOP-19025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17803809#comment-17803809
]
Attila Doroszlai edited comment on HADOOP-19025 at 1/6/24 12:34 PM:
--------------------------------------------------------------------
[[email protected]],
should I add static import for {{assertThat}} in this change? I followed
existing practice I saw in the files being changed (importing {{Assertions}}
and using {{Assertions.assertThat}}), but would prefer static import instead
(the way JUnit assertions are used in the same files).
Current stats on {{trunk}} indicate both are used:
{code}
$ rg -l 'import static org.assertj.core.api.Assertions.assertThat' | wc -l
228
$ rg -l 'import org.assertj.core.api.Assertions' | wc -l
176
{code}
Edit: nevermind, I see that {{assertThat}} is also inherited from {{Assert}},
so the static import cannot be used until we get rid of that inheritance.
was (Author: adoroszlai):
[[email protected]],
should I add static import for {{assertThat}} in this change? I followed
existing practice I saw in the files being changed (importing {{Assertions}}
and using {{Assertions.assertThat}}), but would prefer static import instead
(the way JUnit assertions are used in the same files).
Current stats on {{trunk}} indicate both are used:
{code}
$ rg -l 'import static org.assertj.core.api.Assertions.assertThat' | wc -l
228
$ rg -l 'import org.assertj.core.api.Assertions' | wc -l
176
{code}
> Migrate abstract contract tests to AssertJ
> ------------------------------------------
>
> Key: HADOOP-19025
> URL: https://issues.apache.org/jira/browse/HADOOP-19025
> Project: Hadoop Common
> Issue Type: Improvement
> Components: test
> Reporter: Attila Doroszlai
> Assignee: Attila Doroszlai
> Priority: Major
> Labels: pull-request-available
>
> Replace JUnit4 assertions with equivalent functionality from AssertJ, to make
> contract tests more independent of JUnit version.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]