You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Tibor17 <gi...@git.apache.org> on 2015/09/27 01:34:34 UTC

[GitHub] maven-surefire pull request: [SUREFIRE-1179] integration test

GitHub user Tibor17 opened a pull request:

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

    [SUREFIRE-1179] integration test

    for #105 

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

    $ git pull https://github.com/Tibor17/maven-surefire s4

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

    https://github.com/apache/maven-surefire/pull/106.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 #106
    
----
commit 5ac824733ea4b8201e8acd5c1d6cead0301340ab
Author: Julien Herr <ju...@alcatel-lucent.com>
Date:   2015-09-18T14:19:10Z

    Quick fix for SUREFIRE-1177 and SUREFIRE-1179

commit 5105a84099af74d579d5975b25e1bdfe04333643
Author: Tibor17 <ti...@lycos.com>
Date:   2015-09-26T23:18:12Z

    [SUREFIRE-1179] integration test

----


---
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 pull request: [SUREFIRE-1179] integration test

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

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143505456
  
    @juherr 
    This is the IT, but the problem is in TestNG because the concurrency remains 10 even if dataproviderthreadcount=30.
    Meanwhile I reported issue in TestNG I found when I tested the clone of TestNG project for the IT and installed as snapshot version in my local repo. https://github.com/cbeust/testng/issues/813
    Can you make investigation and find out why we still have only 10 concurrent threads. Feel free to clone my branch and change the value of `dataproviderthreadcount` in POM.


---
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 pull request: [SUREFIRE-1179] integration test

Posted by juherr <gi...@git.apache.org>.
Github user juherr commented on the pull request:

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143733741
  
    Since 5.10, `suite.setDataProviderThreadCount()` is available but surefire doesn't use it.
    
    I'd like to add
    
    ```
            String dataProviderThreadCount = options.get( "dataproviderthreadcount" );
            if ( dataProviderThreadCount != null ) {
                suite.setDataProviderThreadCount( Integer.parseInt(dataProviderThreadCount) );
            }
    ```
    in `TestNGMapConfigurator#configure( XmlSuite suite, Map<String, String> options )` but I don't know if `TestNGMapConfigurator` is the best location to add it and if I'm allowed to update the TestNH dependency of surefire (from 5.7 to 5.10).
    
    I've just test by changing the value of dataproviderthreadcount in the test with 5 and it is working with the update I propose.


---
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 pull request: [SUREFIRE-1179] integration test

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

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143683397
  
    Since 5.10?
    Hm, I was testing with 6.9.x and the number of threads was 10 instead of 30 configured in `dataproviderthreadCount`.
    Pending question - we use small letters in param name i.e. `dataproviderthreadCount`. Does TestNG use CAMEL `dataProviderThreadCount `?


---
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 pull request: [SUREFIRE-1179] integration test

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

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143790836
  
    Alright create `TestNG510Configurator` and register it in `AbstractSurefireMojo` and increate the version in surefire-testng POM.


---
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 pull request: [SUREFIRE-1179] integration test

Posted by juherr <gi...@git.apache.org>.
Github user juherr commented on the pull request:

    https://github.com/apache/maven-surefire/pull/106#issuecomment-162522326
  
    @Tibor17 No, I can't! YOU created this pull-request ;)


---
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 pull request: [SUREFIRE-1179] integration test

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

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143793736
  
    There is already version range [5.3,6.4] you should split which means to split in
    [5.3,5.10) and 
    [5.10,6.4] update only `TestNGMapConfigurator`.
    Do you still need a new configurator if the method is available in 6.x?


---
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 pull request: [SUREFIRE-1179] integration test

Posted by juherr <gi...@git.apache.org>.
Github user juherr commented on the pull request:

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143768585
  
    It's not a problem of time but I just want to understand what I'm doing.
    
    I'm talking about an compile dependency (scoped provided) where, as I understand, users will use the version they want. 
    `TestNG510Configurator` should only be used with TestNG after 5.10 and cannot fail.
    
    Am I missing something?


---
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 pull request: [SUREFIRE-1179] integration test

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

    https://github.com/apache/maven-surefire/pull/106#issuecomment-162337794
  
    @juherr I guess this was already merged in Version 2.19. You can close the pull-request. Thx


---
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 pull request: [SUREFIRE-1179] integration test

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

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143791336
  
    The style with reflection is usually in junit provider, but you'r right, forget reflection in 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 pull request: [SUREFIRE-1179] integration test

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

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143766756
  
    Because we were always dependent on 5.7 and the users may still rely on it.
    It is question of one minute to crate Utility class in the module surefire-testng-util.
    All you need to do is to have import section
    `org.apache.maven.surefire.util.ReflectionUtils.invokeSetter` and call it.
    Rethrow the exception with meaningful error message.


---
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 pull request: [SUREFIRE-1179] integration test

Posted by juherr <gi...@git.apache.org>.
Github user juherr commented on the pull request:

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143743363
  
    Sometime code is easier than explainations :) I updated #105. Feel free to comment.


---
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 pull request: [SUREFIRE-1179] integration test

Posted by Tibor17 <gi...@git.apache.org>.
Github user Tibor17 closed the pull request at:

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


---
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 pull request: [SUREFIRE-1179] integration test

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

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143758786
  
    All you need to do is to call this method with Java Reflection.
    There is `surefire-testng-util` module.
    You should create reflection utility in there.
    
    Please be inspired by `JUnit4ProviderUtil`, `ReflectionUtils` and `
    JUnit4Reflector`.
    
    Then create  `TestNgReflector` class using `ReflectionUtils` with fail-fast
    method `setDataProviderThreadCount` throwing `SurefireReflectionException`.
    In your case the put message in the exception should be properly saying
    that this method is supported since TestNG 5.10 or higher.
    
    Do not forget the license header and Javadoc on the top of your class,
    otherwise the rat-plugin will fail.
    
    
    On Mon, Sep 28, 2015 at 3:26 PM, Julien Herr <no...@github.com>
    wrote:
    
    > Sometime code is easier than explainations :) I updated #105
    > <https://github.com/apache/maven-surefire/pull/105>. Feel free to comment.
    >
    > —
    > Reply to this email directly or view it on GitHub
    > <https://github.com/apache/maven-surefire/pull/106#issuecomment-143743363>
    > .
    >
    
    
    
    -- 
    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 pull request: [SUREFIRE-1179] integration test

Posted by juherr <gi...@git.apache.org>.
Github user juherr commented on the pull request:

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143522916
  
    Awesome! I should have time this week to close it. 


---
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 pull request: [SUREFIRE-1179] integration test

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

    https://github.com/apache/maven-surefire/pull/106#issuecomment-162525723
  
    @juherr Sorry :), really it was me, sorry again :+1: 


---
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 pull request: [SUREFIRE-1179] integration test

Posted by juherr <gi...@git.apache.org>.
Github user juherr commented on the pull request:

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143764774
  
    For my information, why not updating the testng dependency as I did it in #105?
    
    I'll try to add some tests for suite thread count.


---
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 pull request: [SUREFIRE-1179] integration test

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

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143760174
  
    Is there the same principle with thread count for suites?
    I did not test suite thread count because I do not have IT.
    Can you try?
    
    On Mon, Sep 28, 2015 at 4:25 PM, Tibor Digana <ti...@googlemail.com>
    wrote:
    
    > All you need to do is to call this method with Java Reflection.
    > There is `surefire-testng-util` module.
    > You should create reflection utility in there.
    >
    > Please be inspired by `JUnit4ProviderUtil`, `ReflectionUtils` and `
    > JUnit4Reflector`.
    >
    > Then create  `TestNgReflector` class using `ReflectionUtils` with
    > fail-fast method `setDataProviderThreadCount` throwing `
    > SurefireReflectionException`.
    > In your case the put message in the exception should be properly saying
    > that this method is supported since TestNG 5.10 or higher.
    >
    > Do not forget the license header and Javadoc on the top of your class,
    > otherwise the rat-plugin will fail.
    >
    >
    > On Mon, Sep 28, 2015 at 3:26 PM, Julien Herr <no...@github.com>
    > wrote:
    >
    >> Sometime code is easier than explainations :) I updated #105
    >> <https://github.com/apache/maven-surefire/pull/105>. Feel free to
    >> comment.
    >>
    >> —
    >> Reply to this email directly or view it on GitHub
    >> <https://github.com/apache/maven-surefire/pull/106#issuecomment-143743363>
    >> .
    >>
    >
    >
    >
    > --
    > 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 pull request: [SUREFIRE-1179] integration test

Posted by juherr <gi...@git.apache.org>.
Github user juherr commented on the pull request:

    https://github.com/apache/maven-surefire/pull/106#issuecomment-143677343
  
    I had time to analyze and I found that `dataProviderThreadCount` is taken into account only when `m_commandLineTestClasses != null || m_commandLineMethods != null`.
    `m_commandLineTestClasses` could only be != null when `setTestClasses` is called, and `m_commandLineMethods` could only be != null when `-methods` is used, but `-methods` is not available via the deprecated `TestNG#configure(Map cmdLineArgs)`.
    
    I can't say if this behavior is expected or if something should be done in TestNG. What do you think @cbeust?
    
    Another solution would be to update `TestNGMapConfigurator#configure( XmlSuite suite, Map<String, String> options )` (or another Configurator) from surefire in order to use `suite.setDataProviderThreadCount()`. But the method is only available since 5.10 where the current testng used by surefire is 5.7.
    But I don't know if I' allowed to update the dependency.



---
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