Skip to content

Commit

Permalink
Verifying that hotspots are received (#1171)
Browse files Browse the repository at this point in the history
  • Loading branch information
nquinquenel authored Nov 27, 2024
1 parent 3495007 commit bb98631
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void should_locally_detect_hotspots_when_connected_to_sonarqube(@TempDir Path ba
new AnalyzeFilesAndTrackParams(CONFIG_SCOPE_ID, analysisId, List.of(inputFile.toUri()), Map.of(), true, System.currentTimeMillis()))
.join();
assertThat(analysisResult.getFailedAnalysisFiles()).isEmpty();
await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> assertThat(client.getRaisedHotspotsForScopeIdAsList(CONFIG_SCOPE_ID)).isNotEmpty());
await().atMost(10, TimeUnit.SECONDS).untilAsserted(() -> assertThat(client.getRaisedHotspotsForScopeIdAsList(CONFIG_SCOPE_ID)).isNotEmpty());

var hotspot = client.getRaisedHotspotsForScopeIdAsList(CONFIG_SCOPE_ID).get(0);
assertThat(hotspot.getRuleKey()).isEqualTo("java:S2068");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ void it_should_notify_client() {
backend.getIssueService().changeStatus(new ChangeIssueStatusParams("configScope", "key1", ResolutionStatus.WONT_FIX, true));
sseServer.shouldSendServerEventOnce();

await().atMost(Duration.ofSeconds(2)).untilAsserted(() -> assertThat(client.getTaintVulnerabilityChanges())
await().atMost(Duration.ofSeconds(5)).untilAsserted(() -> assertThat(client.getTaintVulnerabilityChanges())
.usingRecursiveFieldByFieldElementComparatorIgnoringFields("addedTaintVulnerabilities.id")
.contains(new DidChangeTaintVulnerabilitiesParams("configScope", Set.of(), List.of(),
List.of(new TaintVulnerabilityDto(storedTaintIssues.get(0).getId(), "key1", true, "ruleKey", "message", Paths.get("file/path"), introductionDate,
Expand Down

0 comments on commit bb98631

Please sign in to comment.