]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-16361 fix randomly failing test
authorAurelien Poscia <aurelien.poscia@sonarsource.com>
Mon, 9 May 2022 10:25:32 +0000 (12:25 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 9 May 2022 20:02:59 +0000 (20:02 +0000)
server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexerTest.java

index e1aa5e079cf61a7fd3ff5114a30a8a1a764731e9..fbe76eebf3166aaf4eed4b278354d17c3b5c1ea2 100644 (file)
@@ -156,7 +156,9 @@ public class RuleIndexerTest {
     List<RuleDoc> ruleDocs = es.getDocuments(TYPE_RULE, RuleDoc.class);
     assertThat(ruleDocs).hasSize(1);
     assertThat(ruleDocs.iterator().next().htmlDescription())
-      .isEqualTo(RULE_DESCRIPTION_SECTION_DTO.getContent() + " " + RULE_DESCRIPTION_SECTION_DTO2.getContent());
+      .contains(RULE_DESCRIPTION_SECTION_DTO.getContent())
+      .contains(RULE_DESCRIPTION_SECTION_DTO2.getContent())
+      .hasSize(RULE_DESCRIPTION_SECTION_DTO.getContent().length() + " ".length() + RULE_DESCRIPTION_SECTION_DTO2.getContent().length());
   }
 
   @Test