From c7bda4931b6d028f2a780e23ab3ec518d49aa995 Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Thu, 14 May 2020 10:13:14 -0500 Subject: [PATCH] Fix unstable test TransitionActionTest --- .../java/org/sonar/server/issue/TransitionActionTest.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/issue/TransitionActionTest.java b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/issue/TransitionActionTest.java index 4916295a099..febb23e63bd 100644 --- a/server/sonar-webserver-webapi/src/test/java/org/sonar/server/issue/TransitionActionTest.java +++ b/server/sonar-webserver-webapi/src/test/java/org/sonar/server/issue/TransitionActionTest.java @@ -27,6 +27,7 @@ import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.sonar.api.issue.Issue; +import org.sonar.api.rules.RuleType; import org.sonar.core.issue.DefaultIssue; import org.sonar.core.issue.IssueChangeContext; import org.sonar.core.util.Uuids; @@ -76,6 +77,10 @@ public class TransitionActionTest { @Test public void execute() { loginAndAddProjectPermission("john", ISSUE_ADMIN); + if (issue.type() == RuleType.SECURITY_HOTSPOT) { + // this transition is not done for hotspots + issue.setType(RuleType.CODE_SMELL); + } issue.setStatus(Issue.STATUS_RESOLVED); issue.setResolution(Issue.RESOLUTION_FIXED); -- 2.39.5