aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-ce
diff options
context:
space:
mode:
authorLéo Geoffroy <99647462+leo-geoffroy-sonarsource@users.noreply.github.com>2022-04-04 18:08:34 +0200
committersonartech <sonartech@sonarsource.com>2022-04-04 20:02:56 +0000
commit12939729652fad6fa91b72c2139da65dc07ec7e0 (patch)
tree4752663c64fe527eabe2129028a22a1f394351cb /server/sonar-ce
parent328aa8c538d17bb2c0f201de221e7edeff5e1349 (diff)
downloadsonarqube-12939729652fad6fa91b72c2139da65dc07ec7e0.tar.gz
sonarqube-12939729652fad6fa91b72c2139da65dc07ec7e0.zip
NO-JIRA Update Mockito and simpleframework to latest major version
Diffstat (limited to 'server/sonar-ce')
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/monitoring/DistributedCEQueueStatusImplTest.java4
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/notification/ReportAnalysisFailureNotificationExecutionListenerTest.java14
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/platform/DatabaseCompatibilityTest.java4
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/queue/CeQueueInitializerTest.java4
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/queue/InternalCeQueueImplTest.java4
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeWorkerImplTest.java10
-rw-r--r--server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/SimpleCeTaskInterrupterTest.java6
7 files changed, 23 insertions, 23 deletions
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/monitoring/DistributedCEQueueStatusImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/monitoring/DistributedCEQueueStatusImplTest.java
index 3a06182c1f1..c6e1c68f238 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/monitoring/DistributedCEQueueStatusImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/monitoring/DistributedCEQueueStatusImplTest.java
@@ -26,7 +26,7 @@ import org.sonar.db.DbClient;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
public class DistributedCEQueueStatusImplTest extends CommonCEQueueStatusImplTest {
private DistributedCEQueueStatusImpl underTest = new DistributedCEQueueStatusImpl(getDbClient(), mock(System2.class));
@@ -44,6 +44,6 @@ public class DistributedCEQueueStatusImplTest extends CommonCEQueueStatusImplTes
public void getPendingCount_returns_0_without_querying_database() {
assertThat(underTest.getPendingCount()).isZero();
- verifyZeroInteractions(getDbClient());
+ verifyNoInteractions(getDbClient());
}
}
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/notification/ReportAnalysisFailureNotificationExecutionListenerTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/notification/ReportAnalysisFailureNotificationExecutionListenerTest.java
index d4a5de2dacc..78815154694 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/notification/ReportAnalysisFailureNotificationExecutionListenerTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/notification/ReportAnalysisFailureNotificationExecutionListenerTest.java
@@ -55,7 +55,7 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.same;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when;
import static org.sonar.db.component.ComponentTesting.newDirectory;
import static org.sonar.db.component.ComponentTesting.newModuleDto;
@@ -89,14 +89,14 @@ public class ReportAnalysisFailureNotificationExecutionListenerTest {
fullMockedUnderTest.onStart(mockedCeTask);
- verifyZeroInteractions(mockedCeTask, notificationService, dbClientMock, serializer, system2);
+ verifyNoInteractions(mockedCeTask, notificationService, dbClientMock, serializer, system2);
}
@Test
public void onEnd_has_no_effect_if_status_is_SUCCESS() {
fullMockedUnderTest.onEnd(ceTaskMock, CeActivityDto.Status.SUCCESS, randomDuration(), ceTaskResultMock, throwableMock);
- verifyZeroInteractions(ceTaskMock, ceTaskResultMock, throwableMock, notificationService, dbClientMock, serializer, system2);
+ verifyNoInteractions(ceTaskMock, ceTaskResultMock, throwableMock, notificationService, dbClientMock, serializer, system2);
}
@Test
@@ -105,7 +105,7 @@ public class ReportAnalysisFailureNotificationExecutionListenerTest {
fullMockedUnderTest.onEnd(ceTaskMock, CeActivityDto.Status.FAILED, randomDuration(), ceTaskResultMock, throwableMock);
- verifyZeroInteractions(ceTaskResultMock, throwableMock, notificationService, dbClientMock, serializer, system2);
+ verifyNoInteractions(ceTaskResultMock, throwableMock, notificationService, dbClientMock, serializer, system2);
}
@Test
@@ -114,7 +114,7 @@ public class ReportAnalysisFailureNotificationExecutionListenerTest {
fullMockedUnderTest.onEnd(ceTaskMock, CeActivityDto.Status.FAILED, randomDuration(), ceTaskResultMock, throwableMock);
- verifyZeroInteractions(ceTaskResultMock, throwableMock, notificationService, dbClientMock, serializer, system2);
+ verifyNoInteractions(ceTaskResultMock, throwableMock, notificationService, dbClientMock, serializer, system2);
}
@Test
@@ -127,7 +127,7 @@ public class ReportAnalysisFailureNotificationExecutionListenerTest {
fullMockedUnderTest.onEnd(ceTaskMock, CeActivityDto.Status.FAILED, randomDuration(), ceTaskResultMock, throwableMock);
- verifyZeroInteractions(ceTaskResultMock, throwableMock, dbClientMock, serializer, system2);
+ verifyNoInteractions(ceTaskResultMock, throwableMock, dbClientMock, serializer, system2);
}
@Test
@@ -263,7 +263,7 @@ public class ReportAnalysisFailureNotificationExecutionListenerTest {
underTest.onEnd(ceTaskMock, CeActivityDto.Status.FAILED, randomDuration(), ceTaskResultMock, null);
verify(notificationService).deliver(same(notificationMock));
- verifyZeroInteractions(ceTaskResultMock);
+ verifyNoInteractions(ceTaskResultMock);
}
@Test
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/platform/DatabaseCompatibilityTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/platform/DatabaseCompatibilityTest.java
index 88db4265c7a..689e43b931a 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/platform/DatabaseCompatibilityTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/platform/DatabaseCompatibilityTest.java
@@ -30,8 +30,8 @@ import org.sonar.server.platform.db.migration.version.DatabaseVersion;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.verifyNoMoreInteractions;
-import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import static org.sonar.server.platform.db.migration.version.DatabaseVersion.Status.FRESH_INSTALL;
import static org.sonar.server.platform.db.migration.version.DatabaseVersion.Status.UP_TO_DATE;
@@ -84,6 +84,6 @@ public class DatabaseCompatibilityTest {
public void stop_has_no_effect() {
underTest.stop();
- verifyZeroInteractions(databaseVersion);
+ verifyNoInteractions(databaseVersion);
}
}
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/queue/CeQueueInitializerTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/queue/CeQueueInitializerTest.java
index bdc737ef294..1f1b1cd1211 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/queue/CeQueueInitializerTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/queue/CeQueueInitializerTest.java
@@ -28,7 +28,7 @@ import org.sonar.ce.taskprocessor.CeProcessingScheduler;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
public class CeQueueInitializerTest {
@@ -52,7 +52,7 @@ public class CeQueueInitializerTest {
underTest.onServerStart(server);
- verifyZeroInteractions(processingScheduler, cleaningScheduler);
+ verifyNoInteractions(processingScheduler, cleaningScheduler);
}
}
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 53ce5b2832d..935948712d7 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
@@ -56,7 +56,7 @@ import static org.assertj.core.api.Assertions.fail;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when;
import static org.sonar.ce.container.ComputeEngineStatus.Status.STARTED;
import static org.sonar.ce.container.ComputeEngineStatus.Status.STOPPING;
@@ -281,7 +281,7 @@ public class InternalCeQueueImplTest {
underTest.cancelWornOuts();
assertThat(db.getDbClient().ceActivityDao().selectByUuid(db.getSession(), task.getUuid())).isPresent();
- verifyZeroInteractions(queueStatusMock);
+ verifyNoInteractions(queueStatusMock);
}
private static class TypedExceptionImpl extends RuntimeException implements TypedException {
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeWorkerImplTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeWorkerImplTest.java
index 2c8e474ff39..77a09c45ee4 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeWorkerImplTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/CeWorkerImplTest.java
@@ -69,7 +69,7 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
import static org.mockito.Mockito.when;
import static org.sonar.ce.taskprocessor.CeWorker.Result.DISABLED;
import static org.sonar.ce.taskprocessor.CeWorker.Result.NO_TASK;
@@ -128,7 +128,7 @@ public class CeWorkerImplTest {
assertThat(underTest.call()).isEqualTo(DISABLED);
- verifyZeroInteractions(taskProcessor, executionListener1, executionListener2);
+ verifyNoInteractions(taskProcessor, executionListener1, executionListener2);
}
@Test
@@ -138,7 +138,7 @@ public class CeWorkerImplTest {
assertThat(underTestNoListener.call()).isEqualTo(DISABLED);
- verifyZeroInteractions(taskProcessor, executionListener1, executionListener2);
+ verifyNoInteractions(taskProcessor, executionListener1, executionListener2);
}
@Test
@@ -147,7 +147,7 @@ public class CeWorkerImplTest {
assertThat(underTest.call()).isEqualTo(NO_TASK);
- verifyZeroInteractions(taskProcessor, executionListener1, executionListener2);
+ verifyNoInteractions(taskProcessor, executionListener1, executionListener2);
}
@Test
@@ -156,7 +156,7 @@ public class CeWorkerImplTest {
assertThat(underTestNoListener.call()).isEqualTo(NO_TASK);
- verifyZeroInteractions(taskProcessor, executionListener1, executionListener2);
+ verifyNoInteractions(taskProcessor, executionListener1, executionListener2);
}
@Test
diff --git a/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/SimpleCeTaskInterrupterTest.java b/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/SimpleCeTaskInterrupterTest.java
index fc2b0ff5961..a1fac0ac5ef 100644
--- a/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/SimpleCeTaskInterrupterTest.java
+++ b/server/sonar-ce/src/test/java/org/sonar/ce/taskprocessor/SimpleCeTaskInterrupterTest.java
@@ -26,7 +26,7 @@ import org.sonar.ce.task.CeTaskCanceledException;
import static org.apache.commons.lang.RandomStringUtils.randomAlphabetic;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.verifyNoInteractions;
public class SimpleCeTaskInterrupterTest {
@@ -60,7 +60,7 @@ public class SimpleCeTaskInterrupterTest {
underTest.onStart(ceTask);
- verifyZeroInteractions(ceTask);
+ verifyNoInteractions(ceTask);
}
@Test
@@ -69,6 +69,6 @@ public class SimpleCeTaskInterrupterTest {
underTest.onEnd(ceTask);
- verifyZeroInteractions(ceTask);
+ verifyNoInteractions(ceTask);
}
}