]> source.dussan.org Git - sonarqube.git/commitdiff
Disable random timezone in tests as gmaven-plugin does not support parallel builds
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 2 Apr 2015 14:53:19 +0000 (16:53 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Thu, 2 Apr 2015 14:53:38 +0000 (16:53 +0200)
pom.xml

diff --git a/pom.xml b/pom.xml
index 49573c964c08d03e427008472af1e3b23021fea0..3871579fd40adc8740944a220664fecd6da702ca 100644 (file)
--- a/pom.xml
+++ b/pom.xml
           </execution>
         </executions>
       </plugin>
+      <!--
+      Choosing a random timezone when executing tests allows to detect
+      early the tests that are heavily coupled with local environment.
+
+      Temporary disabled as gmaven-plugin 1.5 does not support maven parallel builds.
+      See http://jira.codehaus.org/browse/GMAVEN-87
+      -->
+      <!--
       <plugin>
         <groupId>org.codehaus.gmaven</groupId>
         <artifactId>gmaven-plugin</artifactId>
             <configuration>
               <source>
                 <![CDATA[
-                String[] timezones = ["UTC", "EST", "ECT", "CST", "NZ", "GMT-9", "GMT+9"];
+                String[] timezones = ["GMT-9"];
                 String testTimezone = timezones[new Random().nextInt(timezones.length)];
                 project.properties['testTimezone'] = testTimezone;
                 log.info('Timezone used for tests: ' + testTimezone);
           </execution>
         </executions>
       </plugin>
+      -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <systemPropertyVariables>
             <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
-            <!-- temporary workaround. Waiting for tests to not be coupled with env timezone. -->
-            <user.timezone>${testTimezone}</user.timezone>
+            <!--
+            random timezone is temporarily disabled. Waiting for gmaven-plugin to support parallel builds.
+            See profile 'randomize-environment'
+            -->
+            <!--<user.timezone>${testTimezone}</user.timezone>-->
+            <user.timezone>GMT-9</user.timezone>
           </systemPropertyVariables>
           <groups>${junitGroups}</groups>
           <threadCount>1</threadCount>