Eliminate HandlingPriority.CANNOT_HANDLE
[netconf.git] / protocol / netconf-server / src / test / java / org / opendaylight / netconf / server / ConcurrentClientsTest.java
index 701bd82436c41810b035367acdd134e53098a565..e978fe8d6d4315a307946780de6b869838480338 100644 (file)
@@ -212,7 +212,7 @@ public class ConcurrentClientsTest {
             }
         }
 
-        assertEquals(CONCURRENCY, testingNetconfOperation.getMessageCount());
+        assertEquals(CONCURRENCY, testingNetconfOperation.counter.get());
     }
 
     public static Set<String> getOnlyExiServerCaps() {
@@ -236,26 +236,21 @@ public class ConcurrentClientsTest {
         @Override
         public HandlingPriority canHandle(final Document message) {
             return XmlUtil.toString(message).contains(NetconfStartExiMessageProvider.START_EXI)
-                    ? HandlingPriority.CANNOT_HANDLE :
-                    HandlingPriority.HANDLE_WITH_MAX_PRIORITY;
+                ? null : HandlingPriority.HANDLE_WITH_MAX_PRIORITY;
         }
 
         @SuppressWarnings("checkstyle:IllegalCatch")
         @Override
         public Document handle(final Document requestMessage,
                 final NetconfOperationChainedExecution subsequentOperation) throws DocumentedException {
+            LOG.info("Handling netconf message from test {}", XmlUtil.toString(requestMessage));
+            counter.getAndIncrement();
             try {
-                LOG.info("Handling netconf message from test {}", XmlUtil.toString(requestMessage));
-                counter.getAndIncrement();
                 return XmlUtil.readXmlToDocument("<test/>");
             } catch (Exception e) {
                 throw new RuntimeException(e);
             }
         }
-
-        public long getMessageCount() {
-            return counter.get();
-        }
     }
 
     /**