Cleanup tests : remove TestNG
We have some tests using TestNG an some others using JUnit, we need to get rid of TestNG
could you assign this issue to me?
I can't but you are very welcome to submit a pr
@liukun4515 just do it.
ok
How to solve the dependency testing using Junit? The JUnit doesn't support the dependency testing. @fanminshi @lburgazzoli use annotation @ FixMethodOrder or custom method runner?
@liukun4515 I think every unit test should not depend on any other test so you should set-up etcd according to your need in your test
The JUnit doesn't support the dependency testing.
I don't think we should have any dependency testing at all. it is generally a bad practice in testing. We want each test to be independent from each other.
@liukun4515 have you been able to progress on this issue ?
I've made a start with this issue in #358; that's 1/4 done. The ClusterClientTest, AuthClientTest and LockTest still have to be done (hopefully by others than me) before we can fully remove the testng dependency.
The point re. dependency testing is easy enough to resolve - e.g. in #358 the testDelete() now simply first calls testPut() instead of TestNG's dependsOnMethods. That's simpler, clearer and better than (ab)using JUnit's @FixMethodOrder to replace dependsOnMethods, IMHO.
@vorburger yes dependsOnMethods and other similar stuffs should be removed, we can also have independant test so a change on one of the methods does not imact all the test.
Hello there, I'm working on cleaning up the TestNG dependency, and I'm interested if we'd also like to maintain the dependency on AssertJ, it does seem useful, but if we don't want it, then I can clean it up at the same time.
@pdfkpb whatever works best for you. Perhaps two separate commits & PRs is simpler to review?
PS: Personally I anyway prefer G's Truth over AssertJ nowadays, but that's not this issue.
At the moment I would focus to get rid of TestNG only
@pdfkpb any update ?
I'm coming to the end of an internship so it's been a bit busy here, but I'll see about getting a pr in by the end of next week.
@pdfkpb any update ?
@lburgazzoli Unfortunately, my virtual machine I was using was compromised and I lost my code, I'd start it over but have work piling up irl
@pdfkpb you can do it from one test pkg at a time. No need to have one big PR that fixes everything.