From 25be1b9989e89b50a9207b5e47178084e01eeec6 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 16 Oct 2019 11:26:42 +0200 Subject: [PATCH] Migrate deprecated testing components org.scalatest.junit.JUnitRunner and org.mockito.Matchers have replacements, migrate to using them. Change-Id: Iff6fa0c937361bb68d4d001feee29af21a430836 Signed-off-by: Robert Varga --- .../cluster/access/client/ConnectionEntryTest.java | 2 +- .../akka/segjournal/SegmentedFileJournalSpecTest.java | 2 +- .../cluster/persistence/LocalSnapshotStoreSpecTest.java | 2 +- .../controller/remote/rpc/registry/gossip/GossiperTest.java | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ConnectionEntryTest.java b/opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ConnectionEntryTest.java index a76a36950a..1bb921c48b 100644 --- a/opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ConnectionEntryTest.java +++ b/opendaylight/md-sal/cds-access-client/src/test/java/org/opendaylight/controller/cluster/access/client/ConnectionEntryTest.java @@ -7,7 +7,7 @@ */ package org.opendaylight.controller.cluster.access.client; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.verify; diff --git a/opendaylight/md-sal/sal-akka-segmented-journal/src/test/java/org/opendaylight/controller/akka/segjournal/SegmentedFileJournalSpecTest.java b/opendaylight/md-sal/sal-akka-segmented-journal/src/test/java/org/opendaylight/controller/akka/segjournal/SegmentedFileJournalSpecTest.java index da1ba454e1..87c7f99700 100644 --- a/opendaylight/md-sal/sal-akka-segmented-journal/src/test/java/org/opendaylight/controller/akka/segjournal/SegmentedFileJournalSpecTest.java +++ b/opendaylight/md-sal/sal-akka-segmented-journal/src/test/java/org/opendaylight/controller/akka/segjournal/SegmentedFileJournalSpecTest.java @@ -12,7 +12,7 @@ import com.typesafe.config.ConfigFactory; import java.io.File; import org.apache.commons.io.FileUtils; import org.junit.runner.RunWith; -import org.scalatest.junit.JUnitRunner; +import org.scalatestplus.junit.JUnitRunner; @RunWith(JUnitRunner.class) public class SegmentedFileJournalSpecTest extends JavaJournalSpec { diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/persistence/LocalSnapshotStoreSpecTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/persistence/LocalSnapshotStoreSpecTest.java index 7b70063afa..5fb60e64b0 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/persistence/LocalSnapshotStoreSpecTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/persistence/LocalSnapshotStoreSpecTest.java @@ -13,7 +13,7 @@ import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.junit.runner.RunWith; -import org.scalatest.junit.JUnitRunner; +import org.scalatestplus.junit.JUnitRunner; /** * Tests the LocalSnapshotStore using akka's standard test suite for snapshot store plugins via SnapshotStoreSpec. diff --git a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java index 896c024539..7ed3112ddb 100644 --- a/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java +++ b/opendaylight/md-sal/sal-remoterpc-connector/src/test/java/org/opendaylight/controller/remote/rpc/registry/gossip/GossiperTest.java @@ -7,8 +7,8 @@ */ package org.opendaylight.controller.remote.rpc.registry.gossip; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyMap; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyMap; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.reset; @@ -32,7 +32,6 @@ import org.junit.Test; import org.opendaylight.controller.remote.rpc.RemoteOpsProviderConfig; import org.opendaylight.controller.remote.rpc.TerminationMonitor; - public class GossiperTest { private static ActorSystem system; -- 2.36.6