aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-es
diff options
context:
space:
mode:
authorPierre <pierre.guillot@sonarsource.com>2020-12-11 17:20:41 +0100
committersonartech <sonartech@sonarsource.com>2020-12-14 20:07:14 +0000
commitffcea568c79640227b2fd9c562f642b9d087ea10 (patch)
tree6b0c16201bdc6308048744fea48f4e4a9667fd5d /server/sonar-webserver-es
parent4e07979ccca556d5f05a1be05b88f0bd85ff3f66 (diff)
downloadsonarqube-ffcea568c79640227b2fd9c562f642b9d087ea10.tar.gz
sonarqube-ffcea568c79640227b2fd9c562f642b9d087ea10.zip
fix code smells
Diffstat (limited to 'server/sonar-webserver-es')
-rw-r--r--server/sonar-webserver-es/src/test/java/org/sonar/server/es/IndexCreatorTest.java2
-rw-r--r--server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTest.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/es/IndexCreatorTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/es/IndexCreatorTest.java
index 4d78374bbd7..2e3e2b9fee0 100644
--- a/server/sonar-webserver-es/src/test/java/org/sonar/server/es/IndexCreatorTest.java
+++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/es/IndexCreatorTest.java
@@ -245,7 +245,7 @@ public class IndexCreatorTest {
// keep existing metadata
.doesNotContain("Create type metadatas/metadata");
// index has been dropped and re-created
- assertThat(es.countDocuments(FakeIndexDefinition.INDEX_TYPE)).isEqualTo(0);
+ assertThat(es.countDocuments(FakeIndexDefinition.INDEX_TYPE)).isZero();
}
private ImmutableOpenMap<String, ImmutableOpenMap<String, MappingMetadata>> mappings() {
diff --git a/server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTest.java b/server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTest.java
index a975d001517..c2e3289101f 100644
--- a/server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTest.java
+++ b/server/sonar-webserver-es/src/test/java/org/sonar/server/permission/index/PermissionIndexerTest.java
@@ -105,7 +105,7 @@ public class PermissionIndexerTest {
underTest.index(db.getSession(), esQueueDtos);
- assertThat(db.countRowsOfTable(db.getSession(), "es_queue")).isEqualTo(0);
+ assertThat(db.countRowsOfTable(db.getSession(), "es_queue")).isZero();
assertThat(es.countDocuments(INDEX_TYPE_FOO_AUTH)).isEqualTo(1);
}