hadoop-mapreduce-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akira Ajisaka <aajis...@apache.org>
Subject Re: [DISCUSS] Prefer JUnit5 for new tests
Date Tue, 13 Aug 2019 07:22:17 GMT
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 <stevel@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 <aajisaka@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: mapreduce-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: mapreduce-dev-help@hadoop.apache.org


Mime
View raw message