From 3637ca1ca97c03bcc110007f9ec52c4cdef60632 Mon Sep 17 00:00:00 2001 From: Aurelien Poscia Date: Mon, 9 May 2022 12:25:32 +0200 Subject: [PATCH] SONAR-16361 fix randomly failing test --- .../java/org/sonar/server/rule/index/RuleIndexerTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexerTest.java b/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexerTest.java index e1aa5e079cf..fbe76eebf31 100644 --- a/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexerTest.java +++ b/server/sonar-server-common/src/test/java/org/sonar/server/rule/index/RuleIndexerTest.java @@ -156,7 +156,9 @@ public class RuleIndexerTest { List 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 -- 2.39.5