aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2017-11-23 22:01:21 +0100
committerGitHub <noreply@github.com>2017-11-23 22:01:21 +0100
commit4eb8c7f8657ebe5544fcd2283145d175713ab567 (patch)
treedd9e4078d15e052578874234bbb3761e20a448e4 /server/sonar-ce
parente02d9d4a80eeb4f5cff53dd057e86df2c48d4f7e (diff)
downloadsonarqube-4eb8c7f8657ebe5544fcd2283145d175713ab567.tar.gz
sonarqube-4eb8c7f8657ebe5544fcd2283145d175713ab567.zip
Support build of SonarQube with JDK 9
Diffstat (limited to 'server/sonar-ce')
-rw-r--r--server/sonar-ce/pom.xml6
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java22
2 files changed, 9 insertions, 19 deletions
diff --git a/server/sonar-ce/pom.xml b/server/sonar-ce/pom.xml
index 301c2cb31f4..42dc89d5de0 100644
--- a/server/sonar-ce/pom.xml
+++ b/server/sonar-ce/pom.xml
@@ -53,12 +53,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <!-- TODO to be removed -->
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-all</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java
index 74b2a9503f7..753928597ed 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java
@@ -19,23 +19,13 @@
*/
package org.sonar.ce.queue;
-import static com.google.common.base.Preconditions.checkArgument;
-import static java.util.Arrays.asList;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-import static org.sonar.ce.container.ComputeEngineStatus.Status.STARTED;
-import static org.sonar.ce.container.ComputeEngineStatus.Status.STOPPING;
-
+import com.google.common.collect.ImmutableSet;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.List;
import java.util.Optional;
import java.util.Random;
-
import javax.annotation.Nullable;
-
-import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -59,7 +49,13 @@ import org.sonar.server.computation.task.step.TypedException;
import org.sonar.server.organization.DefaultOrganization;
import org.sonar.server.organization.DefaultOrganizationProvider;
-import com.google.common.collect.ImmutableSet;
+import static com.google.common.base.Preconditions.checkArgument;
+import static java.util.Arrays.asList;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+import static org.sonar.ce.container.ComputeEngineStatus.Status.STARTED;
+import static org.sonar.ce.container.ComputeEngineStatus.Status.STOPPING;
public class InternalCeQueueImplTest {
@@ -531,7 +527,7 @@ public class InternalCeQueueImplTest {
CeQueueDto queueDto = db.getDbClient().ceQueueDao().selectByUuid(db.getSession(), task.getUuid()).get();
expectedException.expect(IllegalStateException.class);
- expectedException.expectMessage(Matchers.startsWith("Task is in progress and can't be canceled"));
+ expectedException.expectMessage("Task is in progress and can't be canceled");
underTest.cancel(db.getSession(), queueDto);
}