Skip to content

Commit b0c1578

Browse files
committed
SLE-1242 Fix Python DBD integration test analyzer version inconsistency
1 parent 3bd039d commit b0c1578

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

its/org.sonarlint.eclipse.its.connected.sq/src/org/sonarlint/eclipse/its/connected/sq/SonarQubeConnectedModeTest.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,18 @@ public void test_Java_Python_DBD() {
578578
shellByName("SonarQube - Binding Suggestion").ifPresent(shell -> new DefaultLink(shell, "Don't ask again").click());
579579

580580
openFileAndWaitForAnalysisCompletion(rootProject.getResource("dbd.py"));
581-
waitForSonarLintMarkers(onTheFlyView,
582-
tuple("Fix this condition that always evaluates to false; some subsequent code is never executed. [+2 locations]", "dbd.py", "few seconds ago"));
581+
// The following assertion is not using waitForSonarLintMarkers because of inconsistencies between the lastest-released and dev SonarQube Server analyzers
582+
// The old analyzer version is reporting `Fix this condition that always evaluates to false; some subsequent code is never executed. [+2 locations]`
583+
// while the newer version is reporting `Fix this condition that always evaluates to false. [+1 location]`
584+
// This is a temporary patch and it can be reverted on the next SQS latest-release
585+
Awaitility.await()
586+
.atMost(20, TimeUnit.SECONDS)
587+
.untilAsserted(() -> {
588+
assertThat(onTheFlyView.getIssues()).hasSize(1);
589+
assertThat(onTheFlyView.getIssues())
590+
.extracting(SonarLintIssueMarker::getResource, SonarLintIssueMarker::getCreationDate)
591+
.containsOnly(tuple("dbd.py", "few seconds ago"));
592+
});
583593
new DefaultEditor().close();
584594

585595
openFileAndWaitForAnalysisCompletion(rootProject.getResource("src", "dbd", "Main.java"));

0 commit comments

Comments
 (0)