diff options
author | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-09-01 14:23:49 +0200 |
---|---|---|
committer | Jean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com> | 2014-09-01 14:23:55 +0200 |
commit | d4fdf7c8f487e90c64429d4896cc169cddd7cab3 (patch) | |
tree | 8a185b4bd2a45194cb8efea012d268bb8ebc6eb0 | |
parent | cf818e127b54dbb9791e206874146c62b680a3f9 (diff) | |
download | sonarqube-d4fdf7c8f487e90c64429d4896cc169cddd7cab3.tar.gz sonarqube-d4fdf7c8f487e90c64429d4896cc169cddd7cab3.zip |
SONAR-5484 Fix test on windows
-rw-r--r-- | server/sonar-server/src/test/java/org/sonar/server/search/SearchHealthMediumTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/sonar-server/src/test/java/org/sonar/server/search/SearchHealthMediumTest.java b/server/sonar-server/src/test/java/org/sonar/server/search/SearchHealthMediumTest.java index 05440c82ef9..43716e75379 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/search/SearchHealthMediumTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/search/SearchHealthMediumTest.java @@ -22,6 +22,7 @@ package org.sonar.server.search; import org.junit.ClassRule; import org.junit.Test; import org.sonar.api.rule.RuleKey; +import org.sonar.api.utils.System2; import org.sonar.core.persistence.DbSession; import org.sonar.server.db.DbClient; import org.sonar.server.rule.RuleTesting; @@ -59,7 +60,10 @@ public class SearchHealthMediumTest { assertThat(nodeHealth.getFsUsedPercent()).contains("%"); assertThat(nodeHealth.getJvmThreads()).isGreaterThanOrEqualTo(0L); assertThat(nodeHealth.getProcessCpuPercent()).contains("%"); - assertThat(nodeHealth.getOpenFiles()).isGreaterThanOrEqualTo(0L); + long openFiles = nodeHealth.getOpenFiles(); + if (!tester.get(System2.class).isOsWindows()) { + assertThat(openFiles).isGreaterThanOrEqualTo(0L); + } assertThat(nodeHealth.getJvmUpSince().before(now)).isTrue(); Map<String, IndexHealth> indexHealth = health.getIndexHealth(); |