This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-jms.git


The following commit(s) were added to refs/heads/master by this push:
     new 2926e29  NO-JIRA: resolve some deprecated method usage in tests
2926e29 is described below

commit 2926e29177e5437d9d47a6386b2ad3e481c279ab
Author: Robbie Gemmell <rob...@apache.org>
AuthorDate: Thu Apr 16 14:00:22 2020 +0100

    NO-JIRA: resolve some deprecated method usage in tests
---
 .../java/org/apache/qpid/jms/transports/TransportSupport.java  |  1 +
 .../jms/tracing/opentracing/OpenTracingTracerFactoryTest.java  | 10 +++++-----
 .../qpid/jms/tracing/opentracing/OpenTracingTracerTest.java    |  6 +++---
 .../jms/transports/netty/NettySslTransportFactoryTest.java     |  2 +-
 4 files changed, 10 insertions(+), 9 deletions(-)

diff --git 
a/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/TransportSupport.java
 
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/TransportSupport.java
index 696e6b8..18eace6 100644
--- 
a/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/TransportSupport.java
+++ 
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/transports/TransportSupport.java
@@ -75,6 +75,7 @@ public class TransportSupport {
             } else if (!OpenSsl.supportsKeyManagerFactory()) {
                 LOG.debug("OpenSSL could not be enabled because the version 
provided does not allow a KeyManagerFactory to be used.");
             } else if (options.isVerifyHost() && 
!OpenSsl.supportsHostnameValidation()) {
+                // Keep deprecated check for now, older netty-tcnative 
versions required it and we don't control the version used.
                 LOG.debug("OpenSSL could not be enabled due to verifyHost 
being enabled but not supported by the provided OpenSSL version.");
             } else if (options.getKeyAlias() != null) {
                 LOG.debug("OpenSSL could not be enabled because a keyAlias is 
set and that feature is not supported for OpenSSL.");
diff --git 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/tracing/opentracing/OpenTracingTracerFactoryTest.java
 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/tracing/opentracing/OpenTracingTracerFactoryTest.java
index 0b1f616..07a48f5 100644
--- 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/tracing/opentracing/OpenTracingTracerFactoryTest.java
+++ 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/tracing/opentracing/OpenTracingTracerFactoryTest.java
@@ -38,9 +38,9 @@ public class OpenTracingTracerFactoryTest {
         assertEquals("Unexpected tracer instance type", 
OpenTracingTracer.class, jmsTracer.getClass());
 
         //Check it doesn't close underlying tracer
-        Mockito.verifyZeroInteractions(mock);
+        Mockito.verifyNoInteractions(mock);
         jmsTracer.close();
-        Mockito.verifyZeroInteractions(mock);
+        Mockito.verifyNoInteractions(mock);
     }
 
     @Test
@@ -50,13 +50,13 @@ public class OpenTracingTracerFactoryTest {
 
         //Check it doesn't close underlying tracer if not asked
         JmsTracer jmsTracerDontClose  = OpenTracingTracerFactory.create(mock, 
false);
-        Mockito.verifyZeroInteractions(mock);
+        Mockito.verifyNoInteractions(mock);
         jmsTracerDontClose.close();
-        Mockito.verifyZeroInteractions(mock);
+        Mockito.verifyNoInteractions(mock);
 
         //Check it does close underlying tracer when asked
         JmsTracer jmsTracerClose  = OpenTracingTracerFactory.create(mock, 
true);
-        Mockito.verifyZeroInteractions(mock);
+        Mockito.verifyNoInteractions(mock);
         jmsTracerClose.close();
         Mockito.verify(mock).close();
         Mockito.verifyNoMoreInteractions(mock);
diff --git 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/tracing/opentracing/OpenTracingTracerTest.java
 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/tracing/opentracing/OpenTracingTracerTest.java
index e08badf..2b8ccce 100644
--- 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/tracing/opentracing/OpenTracingTracerTest.java
+++ 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/tracing/opentracing/OpenTracingTracerTest.java
@@ -79,9 +79,9 @@ public class OpenTracingTracerTest extends QpidJmsTestCase {
         Tracer mockTracer2 = Mockito.mock(Tracer.class);
         JmsTracer jmsTracer2  = new OpenTracingTracer(mockTracer2, false);
 
-        Mockito.verifyZeroInteractions(mockTracer2);
+        Mockito.verifyNoInteractions(mockTracer2);
         jmsTracer2.close();
-        Mockito.verifyZeroInteractions(mockTracer2);
+        Mockito.verifyNoInteractions(mockTracer2);
     }
 
     @Test
@@ -90,7 +90,7 @@ public class OpenTracingTracerTest extends QpidJmsTestCase {
         Tracer mockTracer1 = Mockito.mock(Tracer.class);
         JmsTracer jmsTracer1  = new OpenTracingTracer(mockTracer1, true);
 
-        Mockito.verifyZeroInteractions(mockTracer1);
+        Mockito.verifyNoInteractions(mockTracer1);
         jmsTracer1.close();
         Mockito.verify(mockTracer1).close();
         Mockito.verifyNoMoreInteractions(mockTracer1);
diff --git 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/transports/netty/NettySslTransportFactoryTest.java
 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/transports/netty/NettySslTransportFactoryTest.java
index d81fb34..99a4334 100644
--- 
a/qpid-jms-client/src/test/java/org/apache/qpid/jms/transports/netty/NettySslTransportFactoryTest.java
+++ 
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/transports/netty/NettySslTransportFactoryTest.java
@@ -16,13 +16,13 @@
  */
 package org.apache.qpid.jms.transports.netty;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static 
org.hamcrest.collection.IsIterableContainingInAnyOrder.containsInAnyOrder;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 import java.net.URI;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to