[jira] [Work logged] (FILEUPLOAD-302) Upgrade test framework to JUnit Jupiter
[ https://issues.apache.org/jira/browse/FILEUPLOAD-302?focusedWorklogId=349952&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-349952 ] ASF GitHub Bot logged work on FILEUPLOAD-302: - Author: ASF GitHub Bot Created on: 26/Nov/19 19:01 Start Date: 26/Nov/19 19:01 Worklog Time Spent: 10m Work Description: jochenw commented on issue #23: FILEUPLOAD-302: JUnit Jupiter migration URL: https://github.com/apache/commons-fileupload/pull/23#issuecomment-558772308 What benefit does Jupiter provide, apart from "We're using the latest, and greatest."? Besides, doesn't Jupiter have a compatibility layer, tha would allow to update without changing the test classes? (I think, it's called "Vintage".) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 349952) Time Spent: 1h 10m (was: 1h) > Upgrade test framework to JUnit Jupiter > --- > > Key: FILEUPLOAD-302 > URL: https://issues.apache.org/jira/browse/FILEUPLOAD-302 > Project: Commons FileUpload > Issue Type: Task >Reporter: Allon Mureinik >Priority: Minor > Fix For: 2.0 > > Time Spent: 1h 10m > Remaining Estimate: 0h > > Commons FileUpload uses JUnti 4.12, which is a tad upgraded. > Migrating to the modern JUnit Jupiter may help ease new contributors' > participation. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (FILEUPLOAD-302) Upgrade test framework to JUnit Jupiter
[ https://issues.apache.org/jira/browse/FILEUPLOAD-302?focusedWorklogId=324384&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-324384 ] ASF GitHub Bot logged work on FILEUPLOAD-302: - Author: ASF GitHub Bot Created on: 07/Oct/19 13:29 Start Date: 07/Oct/19 13:29 Worklog Time Spent: 10m Work Description: garydgregory commented on issue #23: FILEUPLOAD-302: JUnit Jupiter migration URL: https://github.com/apache/commons-fileupload/pull/23#issuecomment-539011156 @mureinik Thank you for the PR. :-) @kinow Thank you for the review. :-) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 324384) Time Spent: 1h (was: 50m) > Upgrade test framework to JUnit Jupiter > --- > > Key: FILEUPLOAD-302 > URL: https://issues.apache.org/jira/browse/FILEUPLOAD-302 > Project: Commons FileUpload > Issue Type: Task >Reporter: Allon Mureinik >Priority: Minor > Time Spent: 1h > Remaining Estimate: 0h > > Commons FileUpload uses JUnti 4.12, which is a tad upgraded. > Migrating to the modern JUnit Jupiter may help ease new contributors' > participation. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (FILEUPLOAD-302) Upgrade test framework to JUnit Jupiter
[ https://issues.apache.org/jira/browse/FILEUPLOAD-302?focusedWorklogId=324383&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-324383 ] ASF GitHub Bot logged work on FILEUPLOAD-302: - Author: ASF GitHub Bot Created on: 07/Oct/19 13:28 Start Date: 07/Oct/19 13:28 Worklog Time Spent: 10m Work Description: garydgregory commented on pull request #23: FILEUPLOAD-302: JUnit Jupiter migration URL: https://github.com/apache/commons-fileupload/pull/23 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 324383) Time Spent: 50m (was: 40m) > Upgrade test framework to JUnit Jupiter > --- > > Key: FILEUPLOAD-302 > URL: https://issues.apache.org/jira/browse/FILEUPLOAD-302 > Project: Commons FileUpload > Issue Type: Task >Reporter: Allon Mureinik >Priority: Minor > Time Spent: 50m > Remaining Estimate: 0h > > Commons FileUpload uses JUnti 4.12, which is a tad upgraded. > Migrating to the modern JUnit Jupiter may help ease new contributors' > participation. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (FILEUPLOAD-302) Upgrade test framework to JUnit Jupiter
[ https://issues.apache.org/jira/browse/FILEUPLOAD-302?focusedWorklogId=324342&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-324342 ] ASF GitHub Bot logged work on FILEUPLOAD-302: - Author: ASF GitHub Bot Created on: 07/Oct/19 12:37 Start Date: 07/Oct/19 12:37 Worklog Time Spent: 10m Work Description: mureinik commented on issue #23: FILEUPLOAD-302: JUnit Jupiter migration URL: https://github.com/apache/commons-fileupload/pull/23#issuecomment-538989714 @kinow the failure in @coveralls above unveiled a mistake where I forgot to add `@Test` annotations after removing the `TestCase` dependency in `StreamingTest` (point 2.ii in the PR message). It's fixed now, and the coverage is OK again. (so pending a second review or merge based on the previous approval) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 324342) Time Spent: 40m (was: 0.5h) > Upgrade test framework to JUnit Jupiter > --- > > Key: FILEUPLOAD-302 > URL: https://issues.apache.org/jira/browse/FILEUPLOAD-302 > Project: Commons FileUpload > Issue Type: Task >Reporter: Allon Mureinik >Priority: Minor > Time Spent: 40m > Remaining Estimate: 0h > > Commons FileUpload uses JUnti 4.12, which is a tad upgraded. > Migrating to the modern JUnit Jupiter may help ease new contributors' > participation. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (FILEUPLOAD-302) Upgrade test framework to JUnit Jupiter
[ https://issues.apache.org/jira/browse/FILEUPLOAD-302?focusedWorklogId=324326&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-324326 ] ASF GitHub Bot logged work on FILEUPLOAD-302: - Author: ASF GitHub Bot Created on: 07/Oct/19 12:33 Start Date: 07/Oct/19 12:33 Worklog Time Spent: 10m Work Description: coveralls commented on issue #23: FILEUPLOAD-302: JUnit Jupiter migration URL: https://github.com/apache/commons-fileupload/pull/23#issuecomment-538840333 [![Coverage Status](https://coveralls.io/builds/26153793/badge)](https://coveralls.io/builds/26153793) Coverage remained the same at 78.727% when pulling **ab096e9b89dc6c25279c3c02a0c7594e47205bca on mureinik:FILEUPLOAD-302-jupiter-migration** into **273cb114512f79dfe6cbce281a22976f174b588e on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 324326) Time Spent: 0.5h (was: 20m) > Upgrade test framework to JUnit Jupiter > --- > > Key: FILEUPLOAD-302 > URL: https://issues.apache.org/jira/browse/FILEUPLOAD-302 > Project: Commons FileUpload > Issue Type: Task >Reporter: Allon Mureinik >Priority: Minor > Time Spent: 0.5h > Remaining Estimate: 0h > > Commons FileUpload uses JUnti 4.12, which is a tad upgraded. > Migrating to the modern JUnit Jupiter may help ease new contributors' > participation. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (FILEUPLOAD-302) Upgrade test framework to JUnit Jupiter
[ https://issues.apache.org/jira/browse/FILEUPLOAD-302?focusedWorklogId=324163&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-324163 ] ASF GitHub Bot logged work on FILEUPLOAD-302: - Author: ASF GitHub Bot Created on: 07/Oct/19 05:01 Start Date: 07/Oct/19 05:01 Worklog Time Spent: 10m Work Description: coveralls commented on issue #23: FILEUPLOAD-302: JUnit Jupiter migration URL: https://github.com/apache/commons-fileupload/pull/23#issuecomment-538840333 [![Coverage Status](https://coveralls.io/builds/26146229/badge)](https://coveralls.io/builds/26146229) Coverage decreased (-2.3%) to 76.382% when pulling **ebe28d4a6bb0229e0570d3594860773147aea89b on mureinik:FILEUPLOAD-302-jupiter-migration** into **273cb114512f79dfe6cbce281a22976f174b588e on apache:master**. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 324163) Time Spent: 20m (was: 10m) > Upgrade test framework to JUnit Jupiter > --- > > Key: FILEUPLOAD-302 > URL: https://issues.apache.org/jira/browse/FILEUPLOAD-302 > Project: Commons FileUpload > Issue Type: Task >Reporter: Allon Mureinik >Priority: Minor > Time Spent: 20m > Remaining Estimate: 0h > > Commons FileUpload uses JUnti 4.12, which is a tad upgraded. > Migrating to the modern JUnit Jupiter may help ease new contributors' > participation. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (FILEUPLOAD-302) Upgrade test framework to JUnit Jupiter
[ https://issues.apache.org/jira/browse/FILEUPLOAD-302?focusedWorklogId=324155&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-324155 ] ASF GitHub Bot logged work on FILEUPLOAD-302: - Author: ASF GitHub Bot Created on: 07/Oct/19 04:51 Start Date: 07/Oct/19 04:51 Worklog Time Spent: 10m Work Description: mureinik commented on pull request #23: FILEUPLOAD-302: JUnit Jupiter migration URL: https://github.com/apache/commons-fileupload/pull/23 This PR upgrades the project's testing framework from JUnit 4.12 to the modern JUnit Jupiter 5.5.2. Since JUnit 5 Jupiter is not backwards compatible to JUnit 4.x (or even JUnit Vintage), this PR is a bit large, even though most of the changes are merely cosmetic (such as changing the argument order, see details below). In order to make the reviewer's task as easy as possible, this PR does not presume to use JUnit Jupiter's best practices and all its new functionality, but only to migrate the existing tests with as little change as possible. Following PRs may want to improve the tests by using some of JUnit Jupiter's new features. This PR includes the following changes: 1. Maven dependency changes: 1. `junit:junit` was replaced with `org.junit.jupiter:junit-jupiter`. 2. Annotations: 1. `org.junit.jupiter.api.Test` was used as a drop in replacement for `org.juit.Test` without arguments. See 3.i. for handling of `@Test` annotations with an `expected` argument. 1. `org.junit.jupiter.api.BeforeEach` was used as an drop in replacement for `org.junit.Before`. 1. `org.junit.jupiter.api.AfterEach` was used as an drop in replacement for `org.junit.After`. 3. Assertions: 1. `org.junit.jupiter.api.Assertions`' methods were used as drop in replacements for `org.junit.Assert`'s methods with the same name in the simple case of an assertion without a message. In the case of an assertion with a message, `org.junit.jupiter.api.Assertions`' methods were used, but the argument order was changed - `Assert`'s methods take the message as the first argument, while `Assertions`' methods take the message as the last argument. 1. `org.junit.jupiter.api.Assertions`' methods were used as drop in replacements for `junit.framework.TestCase`'s methods with the same name in the simple case of an assertion without a message. 1. `org.junit.jupiter.api.Assertions#assertThrows` was used to assert that a specific exception was throws instead of an `org.junit.Test` annotation with an `expected` argument. As a side bonus, this change makes the tests slightly stricter, as now they can assert the exception was thrown from a specific line and prevent false positives where the test's "set-up" code accidentally threw that exception. 4. Parameterized tests: 1. `FileUploadTest` was rewritten with `@ParameterizedTest` and `@MethodSource` in order to gain an equivalent functionality of JUnit 4's `Parameterized` runner. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 324155) Remaining Estimate: 0h Time Spent: 10m > Upgrade test framework to JUnit Jupiter > --- > > Key: FILEUPLOAD-302 > URL: https://issues.apache.org/jira/browse/FILEUPLOAD-302 > Project: Commons FileUpload > Issue Type: Task >Reporter: Allon Mureinik >Priority: Minor > Time Spent: 10m > Remaining Estimate: 0h > > Commons FileUpload uses JUnti 4.12, which is a tad upgraded. > Migrating to the modern JUnit Jupiter may help ease new contributors' > participation. -- This message was sent by Atlassian Jira (v8.3.4#803005)