From: Duarte Meneses Date: Wed, 25 May 2022 14:22:34 +0000 (+0200) Subject: SGB-12 Fix tests by setting `issueUpdateDate` instead `updatedAt` X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fheads%2Fbranch-10.4;p=sonarqube.git SGB-12 Fix tests by setting `issueUpdateDate` instead `updatedAt` (cherry picked from commit f55c8f10dd67c5797231a89417069b5497073baf) --- diff --git a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/PullActionIT.java b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/PullActionIT.java index 78614da6864..d33af56ec7c 100644 --- a/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/PullActionIT.java +++ b/server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/PullActionIT.java @@ -22,6 +22,7 @@ package org.sonar.server.hotspot.ws; import java.io.IOException; import java.io.InputStream; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.function.Consumer; import java.util.stream.Stream; @@ -343,6 +344,7 @@ public class PullActionIT { IssueDto issueBefore = issueDbTester.insertHotspot(p -> p.setSeverity("MINOR") .setMessage("openIssue") .setCreatedAt(NOW) + .setIssueUpdateDate(new Date(NOW)) .setRule(javaRule) .setRuleUuid(javaRule.getUuid()) .setStatus(Issue.STATUS_TO_REVIEW) @@ -353,12 +355,12 @@ public class PullActionIT { IssueDto issueAfter = issueDbTester.insertHotspot(p -> p.setSeverity("MINOR") .setMessage("openIssue") .setCreatedAt(NOW) + .setIssueUpdateDate(new Date(NOW + 1L)) .setRule(javaRule) .setRuleUuid(javaRule.getUuid()) .setStatus(Issue.STATUS_TO_REVIEW) .setLanguage("java") .setProject(correctMainBranch) - .setUpdatedAt(NOW) .setComponent(correctFile)); TestRequest request = tester.newRequest()