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

[EXEC-114] - Migrate to Junit 5

Open arturobernalg opened this issue 4 years ago • 3 comments

The idea it's migrate all the project to JUnit 5 version

https://issues.apache.org/jira/browse/EXEC-114

arturobernalg avatar Dec 13 '20 09:12 arturobernalg

-1 for now as this project still requires Java 7. Changing the requirement to Java 8 must be done first and discussed on the mailing list. I'm all for Java 8 FWIW.

garydgregory avatar Dec 13 '20 15:12 garydgregory

Hi @garydgregory you're right, I didn't realize that it actually requires version 1.7. How can i start the process to migrate the libs to java 1.8?

arturobernalg avatar Dec 16 '20 20:12 arturobernalg

Hi @garydgregory you're right, I didn't realize that it actually requires version 1.7. How can i start the process to migrate the libs to java 1.8?

You can't, each component is different, and not everyone always agrees when it is time to update to Java 8.

One component which already is on Java 8 is Commons VFS, and it still has bits that are in the JUnit 3 style, like subclassing TestCase. Some of the VFS tests don't even run properly from Eclipse! :-( So a TODO for the community IMO would be to update VFS to be fully on JUnit 4 as a first step (one thing at a time) and then update it to JUnit 5.

garydgregory avatar Jan 03 '21 16:01 garydgregory

@arturobernalg Hi, This component is now on Java 8.

garydgregory avatar Nov 27 '22 19:11 garydgregory

@arturobernalg Hi, This component is now on Java 8.

Hey @garydgregory

I think its already done. TY

arturobernalg avatar Nov 29 '22 20:11 arturobernalg

@arturobernalg Do you even run local builds before pushing out a PR? Some of these tests will obviously fail, for example, see Exec65Test where the OS checks were not updated for JUnit 5 and cause the tests to fail.

@garydgregory Honestly don't fallow you. AFAIU the test is in Junit5.

No error in my local

[WARNING] 24 warnings [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:43 min [INFO] Finished at: 2022-12-04T21:07:17+01:00 [INFO] ------------------------------------------------------------------------

arturobernalg avatar Dec 04 '22 20:12 arturobernalg

@arturobernalg Do you even run local builds before pushing out a PR? Some of these tests will obviously fail, for example, see Exec65Test where the OS checks were not updated for JUnit 5 and cause the tests to fail.

@garydgregory Honestly don't fallow you. AFAIU the test is in Junit5.

No error in my local

[WARNING] 24 warnings [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:43 min [INFO] Finished at: 2022-12-04T21:07:17+01:00 [INFO] ------------------------------------------------------------------------

Self explanatory @arturobernalg :

Error:  Errors: 
Error:    Exec65Test.testExec65WithSleepUsingShellScript:76 Execute The test 'testExec65WithSleepUsingShellScript()' is not possible for OS : Linux (Exit value: 0)
[INFO] 
Error:  Tests run: 104, Failures: 0, Errors: 1, Skipped: 9

garydgregory avatar Dec 04 '22 20:12 garydgregory

@arturobernalg Do you even run local builds before pushing out a PR? Some of these tests will obviously fail, for example, see Exec65Test where the OS checks were not updated for JUnit 5 and cause the tests to fail.

@garydgregory Honestly don't fallow you. AFAIU the test is in Junit5. No error in my local [WARNING] 24 warnings [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:43 min [INFO] Finished at: 2022-12-04T21:07:17+01:00 [INFO] ------------------------------------------------------------------------

Self explanatory @arturobernalg :

Error:  Errors: 
Error:    Exec65Test.testExec65WithSleepUsingShellScript:76 Execute The test 'testExec65WithSleepUsingShellScript()' is not possible for OS : Linux (Exit value: 0)
[INFO] 
Error:  Tests run: 104, Failures: 0, Errors: 1, Skipped: 9

I assume that is why there is a comment in the Java docs. This test currently only works for Mac OS X

I Just add DisabledOnOs in order to play with the OS

arturobernalg avatar Dec 04 '22 21:12 arturobernalg