You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by Akira Ajisaka <aa...@apache.org> on 2019/08/13 07:22:17 UTC

Re: [DISCUSS] Prefer JUnit5 for new tests

My answer:

JUnit 5 -> org.junit.jupiter.api.Test
JUnit 4 -> org.junit.Test
(JUnit 3 -> junit.framework.TestCase)

I found there are still some tests written in JUnit 3 API...

Sorry for the late reply.

-Akira

On Fri, Jul 26, 2019 at 8:37 PM Steve Loughran <st...@cloudera.com> wrote:
>
>
> this is a silly question, but what is a "Junit 5 test"?
>
> We've been slowly adopting the assertJ APIs in new tests in hadoop-aws, and they work file in the older codebase, so even for existing tests we can advocate them. they're very good for making assertions about collections; very verbose for classic assertTrue/assertFalse, but can be used to generate great error strings
>
> On Fri, Jul 26, 2019 at 9:26 AM Akira Ajisaka <aa...@gmail.com> wrote:
>>
>> Hi folks,
>>
>> Now we are slowly migrating from JUnit4 to JUnit5.
>> https://issues.apache.org/jira/browse/HADOOP-14693
>>
>> However, as Steve commented [1], if we are going to migrate the
>> existing tests, the backporting cost will become too expensive.
>> Therefore, I'd like to recommend using JUnit5 for new tests before
>> migrating the existing tests. Using junit-vintage-engine, we can mix
>> JUnit4 and JUnit5 APIs in the same module, so writing new tests in
>> JUnit5 is relatively easy.
>>
>> Any thoughts?
>>
>> [1] https://issues.apache.org/jira/browse/HADOOP-16318?focusedCommentId=16890955&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16890955
>>
>> -Akira
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: mapreduce-dev-unsubscribe@hadoop.apache.org
>> For additional commands, e-mail: mapreduce-dev-help@hadoop.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-dev-help@hadoop.apache.org