Re: Is it time to move forward to JUnit4 (5)?

2019-01-23 Thread oignatenko
Hi Ivan, While I have your attention, I would like to say huge thanks for your contribution to migration efforts. I am specifically talking about trick you proposed when it started, with using TestRule in GridAbstractTest to enable switching between JUnit 3 and 4 execution modes. Looking back,

Re: Is it time to move forward to JUnit4 (5)?

2019-01-23 Thread Павлухин Иван
Cheers! вт, 22 янв. 2019 г. в 20:19, oignatenko : > > ...sort of a follow-up. I gave folks a bit more leeway than originally > planned week or two. > > It's been about a month since master was changed in a way that wouldn't > allow JUnit 3 tests execute anymore (per IGNITE-10177) and I just

Re: Is it time to move forward to JUnit4 (5)?

2019-01-22 Thread oignatenko
...sort of a follow-up. I gave folks a bit more leeway than originally planned week or two. It's been about a month since master was changed in a way that wouldn't allow JUnit 3 tests execute anymore (per IGNITE-10177) and I just started progress on IGNITE-10629 and made a promised inspection for

Re: Is it time to move forward to JUnit4 (5)?

2018-12-19 Thread Павлухин Иван
Dmitriy, Thank you for noticing! It seems we have a problem here. When junit4 test is called from junit3 suite (with help of JUnit4TestAdapter) such tests is skipped silently. It seems that we cannot use @Ignore everywhere yet. ср, 19 дек. 2018 г. в 15:09, oignatenko : > > Hi Ivan, > > These

Re: Is it time to move forward to JUnit4 (5)?

2018-12-19 Thread Dmitriy Pavlov
Hi Igniters, I've tried yesterday to find any of @Ignore d tests with a link to the issue in its value on TeamCity, but I did not manage to. Do you know if JUnit Ignored tests are completely invisible in the TC and its REST? I've also tried to google it, but not found anything yet. I remember

Re: Is it time to move forward to JUnit4 (5)?

2018-12-19 Thread Павлухин Иван
Hi Oleg, I have not quite understood who is going to call (from standpoint of test framework) beforeTestsStarted, beforeTest, afterTest, afterTestsStarted methods? вт, 18 дек. 2018 г. в 23:31, oignatenko : > > Hi Ivan, > > To answer your last question, yes, all the tests are to be marked with

Re: Is it time to move forward to JUnit4 (5)?

2018-12-18 Thread oignatenko
Hi Ivan, To answer your last question, yes, all the tests are to be marked with @Test annotations, and those that are meant to be ignored are going to be marked with @Ignore annotations. There is no exceptions to that, and these annotations will work just as well on tests using our home brewed

Re: Is it time to move forward to JUnit4 (5)?

2018-12-17 Thread Павлухин Иван
Hi Oleg, Now concerns about junit3 elimination are clear for me. And I agree that it is worth to do it. By the way is it possible to access tests which have problems running under junit4? I would like to take a look. Also a clarifying bit regarding next migration steps is needed. Sorry if it was

Re: Is it time to move forward to JUnit4 (5)?

2018-12-17 Thread oignatenko
Hi Ivan, Per my cursory check of the code currently in master, we have 239 test classes that couldn't migrate (that's probably about 500 or something test cases). For comparison, over 1600 classes migrated without problems. This is to answer your questions about how many tests are affected by

Re: Is it time to move forward to JUnit4 (5)?

2018-12-17 Thread Павлухин Иван
Hi Oleg, The things become challenging. Truly I do not see any trivial solution so far. Could you please outline main problems which we are facing today? And how many tests are affected? Some clarifying questions: 1. I know that setup->test->teardown threading was changed for junit4 tests, but

Re: Is it time to move forward to JUnit4 (5)?

2018-12-16 Thread oignatenko
Hi Ivan, As promised in my prior mail, here is the branch where I experimented to address concerns you raised: - https://github.com/gridgain/apache-ignite/tree/ignite-10177-experimental I tested it locally and on Teamcity and it worked as intended. I think I managed to exactly reproduce

Re: Is it time to move forward to JUnit4 (5)?

2018-12-14 Thread oignatenko
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

Re: Is it time to move forward to JUnit4 (5)?

2018-12-14 Thread Павлухин Иван
Hi guys, I started writing a junit4 test for a feature I am currently working on. And immediately I faced a peculiarity with @Before test fixture. I automatically named a method "setUp" and realized that I override a method from a superclass. It can produce unwanted effects. First, it looks

Re: Is it time to move forward to JUnit4 (5)?

2018-12-12 Thread Павлухин Иван
Hi Oleg, Thanks your for detailed answer. Using junit4 annotations where possible sounds good to me. Also I would like to thank everybody involved in migration to junit4 process for your efforts. You were able to move a problem which looked mountain-heavy. I believe that is a significant

Re: Is it time to move forward to JUnit4 (5)?

2018-12-11 Thread oignatenko
Hi Ivan, That's a very good question and I think you spotted a point where Ignite test developer's preferences need to change when migrating from Junit 3 to 4. In brief, when developing under JUnit 3 there were good reasons to prefer our homebrew template methods (beforeTestsStarted, beforeTest,

Re: Is it time to move forward to JUnit4 (5)?

2018-12-11 Thread Павлухин Иван
Ed, Oleg, Could you please clarify on the following point: > 3. Add @Before, @After on methods which should run before, after a > test (setUp, tearDown in current approach). Beforehand we used to override beforeTestsStarted, beforeTest, afterTest, afterTestsStarted. What will happen with these

Re: Is it time to move forward to JUnit4 (5)?

2018-12-10 Thread Vladimir Ozerov
Hi Oleg, Yes, makes perfect sense. Thank you. On Mon, Dec 10, 2018 at 10:14 PM oignatenko wrote: > Hi Vovan, > > I just created JIRA ticket to address your concerns: > - https://issues.apache.org/jira/browse/IGNITE-10629 > > In brief, the plan is that a week or two after migration is over we

Re: Is it time to move forward to JUnit4 (5)?

2018-12-10 Thread oignatenko
Hi Vovan, I just created JIRA ticket to address your concerns: - https://issues.apache.org/jira/browse/IGNITE-10629 In brief, the plan is that a week or two after migration is over we will run code inspection that detects JUnit 3 style tests that lack @Test annotation and fix these tests if

Re: Is it time to move forward to JUnit4 (5)?

2018-12-10 Thread oignatenko
Hello, I would like add few minor clarifications to what Ed wrote. 1. After transition to JUnit4 is fully over (ETA this week) there won't be a need to use @RunWith(JUnit4.class) anymore, so you will be writing test classes as a normal JUnit 4 user, without any special scaffolding. 1.1. Please

Re: Is it time to move forward to JUnit4 (5)?

2018-12-10 Thread Vladimir Ozerov
Got it. Thank you. пн, 10 дек. 2018 г. в 20:52, Dmitriy Pavlov : > Vladimir, AFAIK there will be no single change for overall migration. All > migration will be in a step-by-step manner and mostly transparent for > contributors. > > Both approaches 3&4 will be available for some time. > > First

Re: Is it time to move forward to JUnit4 (5)?

2018-12-10 Thread Dmitriy Pavlov
Vladimir, AFAIK there will be no single change for overall migration. All migration will be in a step-by-step manner and mostly transparent for contributors. Both approaches 3&4 will be available for some time. First of all, we need an opportunity to run existing integration tests in JUnit4.

Re: Is it time to move forward to JUnit4 (5)?

2018-12-10 Thread Eduard Shangareev
Vovan, 1) Tomorrow in core-module. 2) I believe that nothing, old JUnit3 would work if they are a new one. Otherwise, they need to fix merge conflict and add @Test on their new test. And I think that it's unavoidable, we couldn't ask all people to finish their current activity and not start a new

Re: Is it time to move forward to JUnit4 (5)?

2018-12-10 Thread Vladimir Ozerov
Ed, Several questions from my side: 1) When the change is expected to be merged? 2) What contributors with opened PRs and new or updated JUnit3 tests are supposed to do? Rewrite to JUnit4? If yes, then we should give them time to have a chance to get used to new approach and resolve possible

Re: Is it time to move forward to JUnit4 (5)?

2018-12-03 Thread Павлухин Иван
Hi Oleg, I noticed that GridAbstractTest is now capable to run junit4 tests. What are the current recommendations for writing new tests? Can we use junit4 annotation for new tests? пн, 12 нояб. 2018 г. в 19:58, oignatenko : > > Hi Ivan, > > I am currently testing approach you used in pull/5354 in

Re: Is it time to move forward to JUnit4 (5)?

2018-11-12 Thread oignatenko
Hi Ivan, I am currently testing approach you used in pull/5354 in the "pilot" sub-task with examples tests (IGNITE-10174). So far it looks more and more like the way to go. The most promising thing I observed is that after I changed classes in our test framework the way you did, execution of

Re: Is it time to move forward to JUnit4 (5)?

2018-11-12 Thread oignatenko
Hi Jörn, Agree, it is also my understanding that after we migrate part of the tests that still use JUnit 3 (https://issues.apache.org/jira/browse/IGNITE-10173), upgrade to next version is going to be easy and low risk. With regards to asserting exceptions I think you have a good point here, I

Re: Is it time to move forward to JUnit4 (5)?

2018-11-11 Thread Jörn Franke
A transition to junit5 should also be easy - even for the real junit5 (called Jupiter) and not the junit5 compatibility layer (called vintage). For Jupiter the major changes are the order of arguments for assertions (I came over this for 1000 test case with probably 1 assertions in another

Re: Is it time to move forward to JUnit4 (5)?

2018-11-11 Thread Павлухин Иван
Hi, I have rerun RunAll for the aforementioned PR [1]. Results [2] look very similar to ones which we currently have for master. [1] https://github.com/apache/ignite/pull/5354/files [2] https://ci.ignite.apache.org/viewLog.html?buildId=2282588=buildResultsDiv=IgniteTests24Java8_RunAll пт, 9

Re: Is it time to move forward to JUnit4 (5)?

2018-11-09 Thread Павлухин Иван
Hi Oleg, I can outline some motivating ideas. There is no agreed solutions yet, but junit4 might help us in reusing existing tests for improving MVCC coverage. Another area is managing RunAll execution time with help of some kind of tests parameterization. Regarding concrete tests changes from

Re: Is it time to move forward to JUnit4 (5)?

2018-11-09 Thread oignatenko
Hi Ivan, That's a very good question. I would say the primary motivation in the task we discuss is to make the change at the minimal cost and risk. Or, as stated in description of IGNITE-10173 "move... gradually, smoothly and safely". With this in mind I would say that main expected benefit is

Re: Is it time to move forward to JUnit4 (5)?

2018-11-09 Thread oignatenko
Hi Vyacheslav, GridCommonAbstractTest is expected to change too. As pointed in IGNITE-10173 our approach involves all the subclasses of GridAbstractTest - including but not limited to one you mentioned (GridCommonAbstractTest). regards, Oleg -- Sent from:

Re: Is it time to move forward to JUnit4 (5)?

2018-11-08 Thread Павлухин Иван
Hi Oleg, Migrating to Junit 4 sounds as great idea. I believe everybody is quite surprised when finds Junit 3 in Ignite. But for me personally it is good to understand what problem we are trying to solve? What benefits will Junit 4 give us? What are the most painful moments with current testing

Re: Is it time to move forward to JUnit4 (5)?

2018-11-07 Thread oignatenko
Hello, I created JIRA task for this move, with detailed explanation and step-by-step subtasks, your comments are welcome: - https://issues.apache.org/jira/browse/IGNITE-10173 In brief, the plan is to gradually migrate the part of tests that still uses Junit 3 (hundreds if not thousands of those

Re: Is it time to move forward to JUnit4 (5)?

2018-04-18 Thread Dmitry Pavlov
First of all it should be new way for testing without modificaitions in JUnit3-style tests and its base classes. Test would migrate one-by one. If old test is quite stable on 3 and no need to mute it/apply config variations (Parametrized annotation) we could keep it as is for some time. ср, 18

Re: Is it time to move forward to JUnit4 (5)?

2018-04-18 Thread Maxim Muzafarov
+1 for JUnit5 I suppose we should change\create new not only GridCommonAbstractTest, but also rework GridSpiAbstractTest, GridAbstractTest. ср, 18 апр. 2018 г. в 17:37, Vyacheslav Daradur : > I vote for upgrading to JUnit 5. > > It will entail significant changes in the

Re: Is it time to move forward to JUnit4 (5)?

2018-04-18 Thread Vyacheslav Daradur
I vote for upgrading to JUnit 5. It will entail significant changes in the current testing framework. Dmitriy, do you want to change API of GridCommonAbstractTest or deprecate some methods?

Re: Is it time to move forward to JUnit4 (5)?

2018-04-18 Thread Alexey Kuznetsov
+100500 for upgrading of JUnit https://developer.ibm.com/dwblog/2017/top-five-reasons-to-use-junit-5-java/ https://stackify.com/junit-5/ On Wed, Apr 18, 2018 at 8:59 PM, Dmitry Pavlov wrote: > Hi Igniters, > > During MTCGA monitoring I’ve discovered a number of issues

Is it time to move forward to JUnit4 (5)?

2018-04-18 Thread Dmitry Pavlov
Hi Igniters, During MTCGA monitoring I’ve discovered a number of issues related to test framework itself. In addition it is not convinient to mute tests on TC, because in branches (e.g. 2.5 and in master) we can’t mute it separately. So some tests, which already fixed are shown as failed in our