Replace slf4j-log4j12 00/103300/1
authorSangwook Ha <sangwook.ha@verizon.com>
Sat, 16 Apr 2022 00:00:43 +0000 (17:00 -0700)
committerSangwook Ha <sangwook.ha@verizon.com>
Fri, 18 Nov 2022 07:40:46 +0000 (23:40 -0800)
Log4j12 is not developed any more and slf4j-simple should be used
instead of slf4j-log4j12 for routing test outputs.

Also remove unnecessary stubbings detected in some test classes.

JIRA: OPNFLWPLUG-1124
Change-Id: I7b17dfae58125523a3f3c570dd02d0323a3066ab
Signed-off-by: Sangwook Ha <sangwook.ha@verizon.com>
17 files changed:
applications/forwardingrules-sync/pom.xml
applications/topology-manager/pom.xml
extension/openflowjava-extension-eric/pom.xml
extension/openflowjava-extension-nicira/pom.xml
extension/openflowplugin-extension-eric/pom.xml
extension/openflowplugin-extension-nicira/pom.xml
libraries/liblldp/pom.xml
openflowjava/openflow-protocol-impl/pom.xml
openflowjava/openflow-protocol-it/pom.xml
openflowplugin-common/pom.xml
openflowplugin-impl/pom.xml
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/connection/ConnectionContextImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/connection/listener/HandshakeListenerImplTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/rpc/RpcContextImplTest.java
openflowplugin-it/pom.xml
openflowplugin/pom.xml
samples/simple-client/pom.xml

index 7754f4d260eca5f7c944652c4a9d774722ee6617..435cbd4bffef2fdee25f10f2a139741e96864e77 100644 (file)
@@ -55,7 +55,7 @@
 
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
         </dependency>
 
index 74406b455e1dc4b31d744807ca19b712f812177e..801b189829a7325a29a5f45af9b36cc7329e06ef 100644 (file)
@@ -53,7 +53,7 @@
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
+      <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
index bbc340a379694b22880efd94fd6a1fd66b1c6e4c..3fcd5ef66f592f13e6eda020bddb838c2abb70f8 100644 (file)
@@ -35,7 +35,7 @@
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 0447217813cb0a7f1360e4732ca7c4b7fa6db819..2a9243ac283ec1a70ba5480da25e77656aad815a 100644 (file)
@@ -37,7 +37,7 @@
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 0029754664c14e6d901e8dc72cdebb04aebdefd3..e5d19eb2dce532472bbbbc016fe0242e2264f690 100644 (file)
@@ -46,7 +46,7 @@
         <!-- Test dependencies -->
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 592ddb275ce0ec8d915e07ae7652f2a8ee1de8a5..71b4a47f1f5a7074cb43a990431b8cb1e62fa9a2 100644 (file)
@@ -50,7 +50,7 @@
         <!-- Test dependencies -->
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index db702e6d64cb5d5b18ef3d5cb176bec71fea5789..c8b68c7f8dc246404c2417c93c9368e430a75b40 100644 (file)
@@ -24,7 +24,7 @@
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
+      <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
index a8d5d36c87f99f1958e230cc202b3a0a57f300b9..5c0f51b16b297d2c890b4a907cd4cc57473b8209 100644 (file)
@@ -84,9 +84,8 @@
         </dependency>
 
         <dependency>
-            <!-- FIXME: configure slf4j-simple instead -->
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
         </dependency>
 
index 20560fc74dbe17f0eb7cfd93b258768cf147a6e5..fd89b4f686ff43ea65683a6bb3377c305b4691df 100644 (file)
@@ -42,7 +42,7 @@
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <artifactId>slf4j-simple</artifactId>
         </dependency>
     </dependencies>
 </project>
index e869f47afa7df26752f2d08600e714db88d268ca..1f1f2d0997099f393cc4516502ba0c49a2377cd8 100644 (file)
@@ -24,7 +24,7 @@
 
     <dependency>
       <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
+      <artifactId>slf4j-simple</artifactId>
       <scope>test</scope>
     </dependency>
   </dependencies>
index d368486d21666491c90dad1238eeb9a64de7a174..413ea83ee63cdfb677cca5f1c1d7c96f4bd1d757 100644 (file)
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index 42c89b5f99934fe066ae45b71c07ffd9072e1bca..abd6fbe6ff4fb9dbd28bf2eb920c01693b4e4527 100644 (file)
@@ -8,7 +8,6 @@
 
 package org.opendaylight.openflowplugin.impl.connection;
 
-import java.net.InetSocketAddress;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -48,8 +47,6 @@ public class ConnectionContextImplTest {
 
     @Before
     public void setUp() {
-        Mockito.when(connetionAdapter.getRemoteAddress())
-                .thenReturn(InetSocketAddress.createUnresolved("ofp-ut.example.org", 4242));
         Mockito.when(connetionAdapter.isAlive()).thenReturn(true);
 
         connectionContext = new ConnectionContextImpl(connetionAdapter, deviceConnectionStatusProvider);
@@ -110,4 +107,4 @@ public class ConnectionContextImplTest {
         connectionContext.changeStateToWorking();
         Assert.assertEquals(ConnectionContext.CONNECTION_STATE.WORKING, connectionContext.getConnectionState());
     }
-}
\ No newline at end of file
+}
index 3528ed4dc7b766140a89ce4f0dcaa246c6fc15f9..2cb43deaa399ccaabcdb54f2b09c13e487254f27 100644 (file)
@@ -14,7 +14,6 @@ import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
-import java.net.InetSocketAddress;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -100,11 +99,9 @@ public class HandshakeListenerImplTest {
 
     @Test
     public void testOnHandshakeFailure2() {
-        when(connectionAdapter.getRemoteAddress())
-                .thenReturn(InetSocketAddress.createUnresolved("ut-ofp.example.org", 4242));
         connectionContextSpy.setNodeId(new NodeId("openflow:1"));
         handshakeListener.onHandshakeFailure();
         verify(handshakeContext).close();
         verify(connectionContextSpy).closeConnection(false);
     }
-}
\ No newline at end of file
+}
index 30afdaa2de4b0eee400498ffde9dc17e79a3546e..9762a21a35bf533ba269649080ed0fdfca898198 100644 (file)
@@ -158,7 +158,6 @@ public class RpcContextImplTest {
 
     @Test
     public void testClose() {
-        when(routedRpcReg.getInstance()).thenReturn(serviceInstance);
         rpcContext.registerRpcServiceImplementation(TestRpcService.class, serviceInstance);
         rpcContext.close();
         assertTrue(rpcContext.isEmptyRpcRegistrations());
index 474ece849757e4d92b8c5b7ad2d5b7175da59246..974ba99840ab04f08c5de7b322eb490a9948a4f7 100644 (file)
 
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>log4j-over-slf4j</artifactId>
+            <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
         </dependency>
 
index f5891210433cc6d88fe1659f52f7c1bdedf9ba05..7601a3c0214cdc6c42a7a1803166b243fd912b20 100644 (file)
@@ -57,7 +57,7 @@
 
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <artifactId>slf4j-simple</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
index efc62ec038ab1627a1b64440ab31b539eb3903a1..802c10b1208a74330dde03cf00c4bbf66eae428b 100644 (file)
@@ -40,7 +40,7 @@
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
-            <artifactId>slf4j-log4j12</artifactId>
+            <artifactId>slf4j-simple</artifactId>
         </dependency>
         <dependency>
             <groupId>net.sourceforge.argparse4j</groupId>