ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oignatenko <oignate...@gridgain.com>
Subject Re: Is it time to move forward to JUnit4 (5)?
Date Fri, 14 Dec 2018 12:52:19 GMT
Hi Ivan,

The issues you mentioned are real and these issues are expected to be
addressed per IGNITE-10177.

I am currently experimenting with various approaches to tackle that, will
post here when "early preview implementation" is ready to let others take a
look and test it.

Until this is completed the most reliable approach I've found is to fallback
to JUnit 3 way every time that you observe unexpected test behavior and see
no reasonable way to fix it. You can see how I followed this "transitional"
approach in IGNITE-10176 which is expected to be merged to master soon
(meanwhile the code can be seen in PR


With regards to using Before* and After* annotations on overrides of before*
and after* methods of GridAbstractTest, this is pure evil and should be
always avoided (removed if noticed).

When test runs under JUnit 3 these annotations are simply ignored which
makes them totally useless (and misleading to the reader of the code) and
when it runs under JUnit 4 these start doing real harm by making annotated
method run twice.

If you are interested, more detailed explanation with code example is
available in comments under IGNITE-10176:

I am currently trying to figure what could be the best way to communicate
this to API users, possibly in respective method javadocs. Also I plan to
find and clean up all the inappropriate annotations that are already there
in the project in the IGNITE-10177.

If you have further questions, please let me know.

regards, Oleg

Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/

View raw message