]> source.dussan.org Git - sonarqube.git/commitdiff
SGB-12 Fix tests by setting `issueUpdateDate` instead `updatedAt` branch-10.4
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Wed, 25 May 2022 14:22:34 +0000 (16:22 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 27 Mar 2024 20:02:35 +0000 (20:02 +0000)
(cherry picked from commit f55c8f10dd67c5797231a89417069b5497073baf)

server/sonar-webserver-webapi/src/it/java/org/sonar/server/hotspot/ws/PullActionIT.java

index 78614da686472532d10c7e5fdcb9972a47269ac9..d33af56ec7cae9963521ed8ff08d31a6d32fe90b 100644 (file)
@@ -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()