[ 
https://issues.apache.org/jira/browse/STORM-3792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bipin Prasad updated STORM-3792:
--------------------------------
    Description: 
Maven surefire plugin configuration has two important flags:

  (1) reuseForks - setting of true mean reuse created JVMs.

  (2) forkCount - number of JVMs to create for testing. Pure number is an 
absolute count, whereas 1.0C means same as the number of CPUs.

Reusing forked JVMs can cause somewhat indeterminate failures in test when 
global class instances are not properly initialized or cleaned. An example of 
such a singleton class Time. 

Not reusing will cause a slowdown in tests. 

To mitigate this slowdown, wherever the "forkCount=1", change it to 
"forkCount=1.0C" and add reuseForks=false if not already present. However, some 
modules (example storm-hdfs) forkCount cannot be increased from 1 to 1.0C, due 
to either resources limits or global locking (as in hdfs tests). 

  was:
Maven surefire plugin configuration should be set to NOT reuse the forked JVMs 
for testing. Sharing JVMs can cause unintended test failures caused by 
singleton classes being in an inconsistent stage. Example of this class would 
be Time. 

This will cause a slowdown in tests because a new JVM would have to be created.

To mitigate this slowdown, whereever the "forkCount=1", change it to 
"forkCount=1.0C" and add reuseForks=false if not already present.


> Change pom.xml to use more test JVM threads without reuse
> ---------------------------------------------------------
>
>                 Key: STORM-3792
>                 URL: https://issues.apache.org/jira/browse/STORM-3792
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: blobstore, examples, integration-test, storm-hdfs, 
> storm-hive, storm-kafka, storm-kafka-client, storm-kafka-monitor, 
> storm-server, storm-sql
>            Reporter: Bipin Prasad
>            Assignee: Bipin Prasad
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Maven surefire plugin configuration has two important flags:
>   (1) reuseForks - setting of true mean reuse created JVMs.
>   (2) forkCount - number of JVMs to create for testing. Pure number is an 
> absolute count, whereas 1.0C means same as the number of CPUs.
> Reusing forked JVMs can cause somewhat indeterminate failures in test when 
> global class instances are not properly initialized or cleaned. An example of 
> such a singleton class Time. 
> Not reusing will cause a slowdown in tests. 
> To mitigate this slowdown, wherever the "forkCount=1", change it to 
> "forkCount=1.0C" and add reuseForks=false if not already present. However, 
> some modules (example storm-hdfs) forkCount cannot be increased from 1 to 
> 1.0C, due to either resources limits or global locking (as in hdfs tests). 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to