From c287097d62ee14046b4761e493c874da6f1d54da Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 1 Mar 2016 09:36:58 +0100 Subject: [PATCH] Fix timings in performance tests due to hardware/OS change --- .../sonarqube/perf/scanner/suite/IssuesModeTest.java | 5 +++-- .../org/sonarsource/sonarqube/perf/server/ServerTest.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java index 40577235054..cced5e65d13 100644 --- a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java +++ b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java @@ -21,6 +21,7 @@ package org.sonarsource.sonarqube.perf.scanner.suite; import com.sonar.orchestrator.Orchestrator; import com.sonar.orchestrator.build.SonarRunner; +import com.sonar.orchestrator.build.SonarScanner; import org.sonarsource.sonarqube.perf.PerfRule; import org.sonarsource.sonarqube.perf.PerfTestCase; import java.io.File; @@ -57,7 +58,7 @@ public class IssuesModeTest extends PerfTestCase { File userHome = temp.newFolder(); orchestrator.getServer().provisionProject("sample", "xoo-sample"); orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-xoo-issue-per-line"); - SonarRunner runner = newScanner( + SonarScanner runner = newScanner( "-Xmx512m -server -XX:MaxPermSize=64m", "sonar.analysis.mode", "issues", "sonar.userHome", userHome.getAbsolutePath(), @@ -67,7 +68,7 @@ public class IssuesModeTest extends PerfTestCase { long duration = System.currentTimeMillis() - start; System.out.println("Issues analysis: " + duration + "ms"); - perfRule.assertDurationAround(duration, 4450L); + perfRule.assertDurationAround(duration, 5230L); } @Test diff --git a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/server/ServerTest.java b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/server/ServerTest.java index ac4afed4fe9..36687d52c2d 100644 --- a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/server/ServerTest.java +++ b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/server/ServerTest.java @@ -47,7 +47,7 @@ public class ServerTest extends PerfTestCase { .build(); try { long startupDuration = start(orchestrator); - assertDurationAround(startupDuration, 46000); + assertDurationAround(startupDuration, 41000); long shutdownDuration = stop(orchestrator); // can't use percent margins because logs are second-grained but not milliseconds -- 2.39.5