You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by ham1 <gi...@git.apache.org> on 2017/12/06 18:44:31 UTC

[GitHub] jmeter pull request #350: Parallelised unit tests

GitHub user ham1 opened a pull request:

    https://github.com/apache/jmeter/pull/350

    Parallelised unit tests

    ## Description
    
    introduced `JMeterSerialTest` interface for tests which need to be run in sequence not concurrently.
    Re-wrote `TestFileServer` in Spock to use private constructor to get around singleton and make clearer to understand.
    Added a test listener to time and log to file time taken for each unit test.
    Also refactored/re-formatted some code while investigating parallel test failures.
    
    `ant _test` time on a 4 core laptop:
    before: 1m 19s
    after:  51s
    
    on an 8 core PC:
    before: 59s
    after:  31s
    
    I'd welcome more testing on different configurations and review.
    
    ## Motivation and Context
    
    Speed up feedback
    
    ## How Has This Been Tested?
    
    100 iterations of `ant _test` on an 8 core machine
    50 iterations of `ant _test` on a 4 core machine
    
    ## Screenshots (if appropriate):
    
    ## Types of changes
    <!--- What types of changes does your code introduce? Delete as appropriate -->
    - Dev improvement
    
    ## Checklist:
    - [x] My code follows the [code style][style-guide] of this project.
    - [x] I have updated the documentation accordingly.
    
    [style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


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

    $ git pull https://github.com/ham1/jmeter parallelise_unit_tests

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

    https://github.com/apache/jmeter/pull/350.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 #350
    
----
commit 8e1c2b65221bccdcf93e29da6cd1875d016685b5
Author: Graham Russell <gr...@ham1.co.uk>
Date:   2017-12-06T17:32:55Z

    Parallelised unit tests.
    Introduced JMeterSerialTest interface for tests which need to be run
    individually in sequence not concurrently.
    Re-wrote TestFileServer in Spock to use private constructor to get around singleton.
    Also refactored/re-formatted some code while investigating parallel test failures.

----


---

[GitHub] jmeter issue #350: Parallelised unit tests

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

    https://github.com/apache/jmeter/pull/350
  
    Maybe this is the culprit:
    
    URL: http://svn.apache.org/viewvc?rev=1817421&view=rev
    Log:
    Make mock react correctly on setText/getText


---

[GitHub] jmeter issue #350: Parallelised unit tests

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

    https://github.com/apache/jmeter/pull/350
  
    # [Codecov](https://codecov.io/gh/apache/jmeter/pull/350?src=pr&el=h1) Report
    > Merging [#350](https://codecov.io/gh/apache/jmeter/pull/350?src=pr&el=desc) into [trunk](https://codecov.io/gh/apache/jmeter/commit/9874acaf7db599d73624fc6f30ca448e9299ae0e?src=pr&el=desc) will **increase** coverage by `<.01%`.
    > The diff coverage is `89.28%`.
    
    [![Impacted file tree graph](https://codecov.io/gh/apache/jmeter/pull/350/graphs/tree.svg?token=6Q7CI1wFSh&width=650&height=150&src=pr)](https://codecov.io/gh/apache/jmeter/pull/350?src=pr&el=tree)
    
    ```diff
    @@             Coverage Diff              @@
    ##              trunk     #350      +/-   ##
    ============================================
    + Coverage     58.29%   58.29%   +<.01%     
    - Complexity    10207    10228      +21     
    ============================================
      Files          1160     1160              
      Lines         74466    74424      -42     
      Branches       7365     7362       -3     
    ============================================
    - Hits          43409    43388      -21     
    + Misses        28561    28535      -26     
    - Partials       2496     2501       +5
    ```
    
    
    | [Impacted Files](https://codecov.io/gh/apache/jmeter/pull/350?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
    |---|---|---|---|
    | [...isualizers/backend/SamplerMetricTimedModeTest.java](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvdmlzdWFsaXplcnMvYmFja2VuZC9TYW1wbGVyTWV0cmljVGltZWRNb2RlVGVzdC5qYXZh) | `100% <ø> (ø)` | `7 <0> (ø)` | :arrow_down: |
    | [...isualizers/backend/SamplerMetricFixedModeTest.java](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvdmlzdWFsaXplcnMvYmFja2VuZC9TYW1wbGVyTWV0cmljRml4ZWRNb2RlVGVzdC5qYXZh) | `100% <ø> (ø)` | `9 <0> (ø)` | :arrow_down: |
    | [...ter/protocol/http/control/TestCacheManagerHC4.java](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvcHJvdG9jb2wvaHR0cC9jb250cm9sL1Rlc3RDYWNoZU1hbmFnZXJIQzQuamF2YQ==) | `78.18% <ø> (ø)` | `12 <0> (ø)` | :arrow_down: |
    | [...g/apache/jmeter/assertions/SMIMEAssertionTest.java](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvYXNzZXJ0aW9ucy9TTUlNRUFzc2VydGlvblRlc3QuamF2YQ==) | `100% <100%> (ø)` | `9 <1> (ø)` | :arrow_down: |
    | [...c/org/apache/jmeter/reporters/TestResultSaver.java](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvcmVwb3J0ZXJzL1Rlc3RSZXN1bHRTYXZlci5qYXZh) | `100% <100%> (ø)` | `7 <1> (ø)` | :arrow_down: |
    | [...rc/core/org/apache/jmeter/services/FileServer.java](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree#diff-c3JjL2NvcmUvb3JnL2FwYWNoZS9qbWV0ZXIvc2VydmljZXMvRmlsZVNlcnZlci5qYXZh) | `71.13% <100%> (-0.08%)` | `56 <3> (ø)` | |
    | [...t/src/org/apache/jmeter/config/TestCVSDataSet.java](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvY29uZmlnL1Rlc3RDVlNEYXRhU2V0LmphdmE=) | `96.17% <100%> (ø)` | `10 <1> (ø)` | :arrow_down: |
    | [...ache/jmeter/functions/TestFileRowColContainer.java](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvZnVuY3Rpb25zL1Rlc3RGaWxlUm93Q29sQ29udGFpbmVyLmphdmE=) | `82.71% <100%> (ø)` | `6 <3> (ø)` | :arrow_down: |
    | [...c/org/apache/jmeter/samplers/TestSampleResult.java](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvc2FtcGxlcnMvVGVzdFNhbXBsZVJlc3VsdC5qYXZh) | `93.85% <100%> (ø)` | `24 <4> (ø)` | :arrow_down: |
    | [...t/src/org/apache/jmeter/functions/PackageTest.java](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree#diff-dGVzdC9zcmMvb3JnL2FwYWNoZS9qbWV0ZXIvZnVuY3Rpb25zL1BhY2thZ2VUZXN0LmphdmE=) | `91.63% <100%> (ø)` | `25 <1> (ø)` | :arrow_down: |
    | ... and [18 more](https://codecov.io/gh/apache/jmeter/pull/350/diff?src=pr&el=tree-more) | |
    
    ------
    
    [Continue to review full report at Codecov](https://codecov.io/gh/apache/jmeter/pull/350?src=pr&el=continue).
    > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
    > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
    > Powered by [Codecov](https://codecov.io/gh/apache/jmeter/pull/350?src=pr&el=footer). Last update [9874aca...bbdb3e3](https://codecov.io/gh/apache/jmeter/pull/350?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).



---

[GitHub] jmeter issue #350: Parallelised unit tests

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

    https://github.com/apache/jmeter/pull/350
  
    Hi @ham1 ,
    It seems there are issues in headless mode following my merge of this PR.
    
    See https://travis-ci.org/apache/jmeter/jobs/313214205
    
    I'll have a look this week-end but if you have an idea before, feel free to propose a PR.
    
    Regards


---

[GitHub] jmeter issue #350: Parallelised unit tests

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

    https://github.com/apache/jmeter/pull/350
  
    Not sure. I can reproduce on trunk but It doesn't happen on this PR for me. Should have time at the weekend to investigate,


---

[GitHub] jmeter issue #350: Parallelised unit tests

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

    https://github.com/apache/jmeter/pull/350
  
    If we initialize the string text to an empty string in the anonymous inner class, the tests pass. 


---

[GitHub] jmeter pull request #350: Parallelised unit tests

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

    https://github.com/apache/jmeter/pull/350


---