]> source.dussan.org Git - sonarqube.git/commitdiff
Fix assertions of sonar-server-benchmarks
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 8 Dec 2014 10:48:50 +0000 (11:48 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 8 Dec 2014 11:01:57 +0000 (12:01 +0100)
server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java
server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java

index 640cdcf6abdb983a63c14a18b8fdfcaaf1eccb1a..b869154f5dcb6fc0f57fe45d257eb85f7b4d039d 100644 (file)
@@ -93,7 +93,7 @@ public class IssueIndexBenchmarkTest {
     LOGGER.info(String.format("%d authorizations indexed in %d ms (%d docs/second)", PROJECTS, period, 1000 * PROJECTS / period));
 
     // big range as absolute value is quite slow
-    benchmark.expectBetween("Time to index issue authorizations", period, 200L, 500L);
+    benchmark.expectBetween("Time to index issue authorizations", period, 10L, 500L);
   }
 
   private void benchmarkIssueIndexing() {
@@ -174,7 +174,6 @@ public class IssueIndexBenchmarkTest {
       issue.setAssignee(users.next());
       issue.setAuthorLogin(users.next());
       issue.setLine(RandomUtils.nextInt());
-      issue.setTechnicalCreationDate(new Date());
       issue.setTechnicalUpdateDate(new Date());
       issue.setFuncUpdateDate(new Date());
       issue.setFuncCreationDate(new Date());
index 8cd10343264f02f6407535e4685a709ac4198e7c..cc573b3e87ae3ddf92c7bfdd6c525714dc234c13 100644 (file)
@@ -82,7 +82,7 @@ public class SourceIndexBenchmarkTest {
 
     long dirSize = FileUtils.sizeOfDirectory(tester.getEsServerHolder().getHomeDir());
     LOGGER.info(String.format("ES dir: " + FileUtils.byteCountToDisplaySize(dirSize)));
-    benchmark.expectBetween("ES dir size (b)", dirSize, 73L * FileUtils.ONE_MB, 80L * FileUtils.ONE_MB);
+    benchmark.expectBetween("ES dir size (b)", dirSize, 86L * FileUtils.ONE_MB, 93L * FileUtils.ONE_MB);
   }
 
   private void benchmarkQueries() {