commons-collections icon indicating copy to clipboard operation
commons-collections copied to clipboard

Updated the fail() exceptions with Junit5.

Open dota17 opened this issue 5 years ago • 9 comments

dota17 avatar May 07 '20 11:05 dota17

Coverage Status

Coverage decreased (-0.004%) to 90.123% when pulling 46ad29ebaeba698a92f576992adbc28cf0b89435 on dota17:junit5WithExceptions into cec45f826fad9e0eeccfcb1805300e75c4dfe5d2 on apache:master.

coveralls avatar May 08 '20 03:05 coveralls

@dota17 The title says "WIP". Are you still working on it?

garydgregory avatar May 12 '20 14:05 garydgregory

@dota17 The title says "WIP". Are you still working on it?

Yes, I am. If anyone has time to review, it would be really nice. ;-)

Thanks

dota17 avatar May 21 '20 12:05 dota17

@dota17 The title says "WIP". Are you still working on it?

Yes, I am. If anyone has time to review, it would be really nice. ;-)

Thanks

Hi @dota17 This PR currently touches 124 files, which is a lot to review. Personally, for me to review this, I'd want to know the PR is as best as you can make it, because, as you can imagine, I really do not want to do it twice! ;-) So either it's WIP or it is as good as it is going to get from your POV at least. Please let us know...

garydgregory avatar May 21 '20 14:05 garydgregory

Hi @garydgregory Under the folder commons-collections/src/test/java/org/apache/commons/collections4 (junit5WithExceptions), I executed the command to get the fails without annotate and import. grep -R fail * | grep -v import |grep -v "\/\/" | grep -v "*" The last 58 lines only use the fail without exception to get the failure details. I had used JUnit 5's assertThrows() in the tests instead of fail() or Assert.fail() in the 132 files.

dota17 avatar May 23 '20 07:05 dota17

Hi @garydgregory I want to migrate to JUnit5 Jupiter. Such as the pr : https://github.com/apache/commons-csv/pull/49 Is it OK ?

dota17 avatar May 28 '20 11:05 dota17

comparators/AbstractComparatorTest.java comparators/BooleanComparatorTest.java comparators/ComparatorChainTest.java comparators/FixedOrderComparatorTest.java comparators/ReverseComparatorTest.java iterators/BoundedIteratorTest.java iterators/PeekingIteratorTest.java iterators/PushbackIteratorTest.java iterators/SkippingIteratorTest.java keyvalue/AbstractMapEntryTest.java keyvalue/DefaultKeyValueTest.java keyvalue/DefaultMapEntryTest.java keyvalue/TiedMapEntryTest.java keyvalue/UnmodifiableMapEntryTest.java map/LazyMapTest.java map/LazySortedMapTest.java properties/AbstractPropertiesFactoryTest.java properties/PropertiesFactoryTest.java properties/SortedPropertiesFactoryTest.java

org.junit.jupiter.api.Test was used as a drop in replacement for org.juit.Test without arguments. These Tests are with arguments, how to proceed?

dota17 avatar May 30 '20 07:05 dota17

I just merged a series of JUnit 5 PRs; if this PR still contains changes not covered in git master, please rebase, if not, please close it. TY!

garydgregory avatar Mar 04 '22 14:03 garydgregory

I think JUnit 5 work might be done in master?

garydgregory avatar Mar 06 '22 22:03 garydgregory