You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by MatousJobanek <gi...@git.apache.org> on 2017/07/25 14:24:34 UTC

[GitHub] maven-surefire pull request #160: SUREFIRE-1398 Sets threadCount only when p...

GitHub user MatousJobanek opened a pull request:

    https://github.com/apache/maven-surefire/pull/160

    SUREFIRE-1398 Sets threadCount only when parallel parameter is set

    Otherwise, the TestNG fails with 
    `Cannot use a threadCount parameter less than 1; 1 > 0` 
    in some cases when the parallel parameter was not set. To identify the cases, take a look at related Jira issue: https://issues.apache.org/jira/browse/SUREFIRE-1398
    I removed the check for positiveness of the `threadCount` value as it's a responsibility of the user to provide correct value.
    The question is if the default value of `threadCount` parameter shouldn't be 1, to avoid such a problems...? If yes, then I'll update my PR

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MatousJobanek/maven-surefire SUREFIRE-1398

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven-surefire/pull/160.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #160
    
----
commit 30df0c3fb5cc1f22caf0a9031155cb2d778b3fab
Author: Matous Jobanek <mj...@redhat.com>
Date:   2017-07-25T14:19:01Z

    SUREFIRE-1398 Sets threadCount only when parallel parameter is set

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org

[GitHub] maven-surefire issue #160: SUREFIRE-1398 threadCount is set for JUnit only w...

Posted by Tibor17 <gi...@git.apache.org>.
Github user Tibor17 commented on the issue:

    https://github.com/apache/maven-surefire/pull/160
  
    @MatousJobanek 
    It should be sanity check and Mojo should fail if `threadCount` is <= 0 && isApplicable.
    IsApplicable is TRUE if `forkMode` is "pertest" OR `parallel` is any of ("classes", "methods", "both", "suites", "suitesAndClasses", "suitesAndMethods", "classesAndMethods", "all").
    
    The Mojo should fail even if `threadCount` is <> 0 AND `forkMode` != "pertest" AND `parallel` == NULL.
    
    The Mojo should fail if `forkCount` is < 0 AND `forkMode` == "once" (default).
    
    `AbstractSurefireMojo` is some methods which maybe solve this and convert old forkMode to forkCount so it is not so direct to do like I wrote this pseudo code.
    
    The most important is to run the build `mvn install -P run-its`, cca 50 minutes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-surefire issue #160: SUREFIRE-1398 Sets threadCount only when parallel...

Posted by Tibor17 <gi...@git.apache.org>.
Github user Tibor17 commented on the issue:

    https://github.com/apache/maven-surefire/pull/160
  
    If you plan a new commit, pls do not create two. Amend the previous one.
    Thx.
    
    On Tue, Jul 25, 2017 at 5:29 PM, Tibor Digana <ti...@googlemail.com>
    wrote:
    
    > Pls check it together with documentation of param "forkMode". I think
    > threadCount can be used with forkMode as well.
    >
    > On Tue, Jul 25, 2017 at 4:24 PM, Matous Jobanek <no...@github.com>
    > wrote:
    >
    >> Otherwise, the TestNG fails with
    >> Cannot use a threadCount parameter less than 1; 1 > 0
    >> in some cases when the parallel parameter was not set. To identify the
    >> cases, take a look at related Jira issue: https://issues.apache.org/jira
    >> /browse/SUREFIRE-1398
    >> I removed the check for positiveness of the threadCount value as it's a
    >> responsibility of the user to provide correct value.
    >> The question is if the default value of threadCount parameter shouldn't
    >> be 1, to avoid such a problems...? If yes, then I'll update my PR
    >> ------------------------------
    >> You can view, comment on, or merge this pull request online at:
    >>
    >>   https://github.com/apache/maven-surefire/pull/160
    >> Commit Summary
    >>
    >>    - SUREFIRE-1398 Sets threadCount only when parallel parameter is set
    >>
    >> File Changes
    >>
    >>    - *M* maven-surefire-common/src/main/java/org/apache/maven/plugin/
    >>    surefire/AbstractSurefireMojo.java
    >>    <https://github.com/apache/maven-surefire/pull/160/files#diff-0> (13)
    >>
    >> Patch Links:
    >>
    >>    - https://github.com/apache/maven-surefire/pull/160.patch
    >>    - https://github.com/apache/maven-surefire/pull/160.diff
    >>
    >> —
    >> You are receiving this because you are subscribed to this thread.
    >> Reply to this email directly, view it on GitHub
    >> <https://github.com/apache/maven-surefire/pull/160>, or mute the thread
    >> <https://github.com/notifications/unsubscribe-auth/AA_yR4lRkgmqVWg76yDzf07EhQ9kTSotks5sRfqfgaJpZM4OioY5>
    >> .
    >>
    >
    >
    >
    > --
    > Cheers
    > Tibor
    >
    
    
    
    -- 
    Cheers
    Tibor



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-surefire issue #160: SUREFIRE-1398 threadCount is set for JUnit only w...

Posted by MatousJobanek <gi...@git.apache.org>.
Github user MatousJobanek commented on the issue:

    https://github.com/apache/maven-surefire/pull/160
  
    Sorry, I didn't notice that the parameter is used also in other cases.
    I changed the commit to set the `threadCount` only when it is a positive value also in case of JUnit - in the same way as it is done in case of TestNG


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[GitHub] maven-surefire issue #160: SUREFIRE-1398 Sets threadCount only when parallel...

Posted by Tibor17 <gi...@git.apache.org>.
Github user Tibor17 commented on the issue:

    https://github.com/apache/maven-surefire/pull/160
  
    Pls check it together with documentation of param "forkMode". I think
    threadCount can be used with forkMode as well.
    
    On Tue, Jul 25, 2017 at 4:24 PM, Matous Jobanek <no...@github.com>
    wrote:
    
    > Otherwise, the TestNG fails with
    > Cannot use a threadCount parameter less than 1; 1 > 0
    > in some cases when the parallel parameter was not set. To identify the
    > cases, take a look at related Jira issue: https://issues.apache.org/
    > jira/browse/SUREFIRE-1398
    > I removed the check for positiveness of the threadCount value as it's a
    > responsibility of the user to provide correct value.
    > The question is if the default value of threadCount parameter shouldn't
    > be 1, to avoid such a problems...? If yes, then I'll update my PR
    > ------------------------------
    > You can view, comment on, or merge this pull request online at:
    >
    >   https://github.com/apache/maven-surefire/pull/160
    > Commit Summary
    >
    >    - SUREFIRE-1398 Sets threadCount only when parallel parameter is set
    >
    > File Changes
    >
    >    - *M* maven-surefire-common/src/main/java/org/apache/maven/
    >    plugin/surefire/AbstractSurefireMojo.java
    >    <https://github.com/apache/maven-surefire/pull/160/files#diff-0> (13)
    >
    > Patch Links:
    >
    >    - https://github.com/apache/maven-surefire/pull/160.patch
    >    - https://github.com/apache/maven-surefire/pull/160.diff
    >
    > —
    > You are receiving this because you are subscribed to this thread.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/maven-surefire/pull/160>, or mute the thread
    > <https://github.com/notifications/unsubscribe-auth/AA_yR4lRkgmqVWg76yDzf07EhQ9kTSotks5sRfqfgaJpZM4OioY5>
    > .
    >
    
    
    
    -- 
    Cheers
    Tibor



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org