You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2024/01/06 12:35:00 UTC
[jira] [Comment Edited] (HADOOP-19025) Migrate abstract contract tests to AssertJ
[ 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:
--------------------------------------------------------------------
[~stevel@apache.org],
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):
[~stevel@apache.org],
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: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org