X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=benchmark%2Fntfbenchmark%2Fsrc%2Fmain%2Fjava%2Fntfbenchmark%2Fimpl%2FNtfbenchmarkProvider.java;h=5ea3b0fffb2ddb618a30cd2049d53e7a85823e22;hp=f6c112da52d91784ece26a321662a74e384952e6;hb=70dfa437ef06c2a4ca19557a1ae5e9fc8a1324a3;hpb=258d8039ac144aeee2efa7943228c0fc6cdaf651 diff --git a/benchmark/ntfbenchmark/src/main/java/ntfbenchmark/impl/NtfbenchmarkProvider.java b/benchmark/ntfbenchmark/src/main/java/ntfbenchmark/impl/NtfbenchmarkProvider.java index f6c112da52..5ea3b0fffb 100644 --- a/benchmark/ntfbenchmark/src/main/java/ntfbenchmark/impl/NtfbenchmarkProvider.java +++ b/benchmark/ntfbenchmark/src/main/java/ntfbenchmark/impl/NtfbenchmarkProvider.java @@ -14,8 +14,8 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; -import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService; -import org.opendaylight.controller.md.sal.binding.api.NotificationService; +import org.opendaylight.mdsal.binding.api.NotificationPublishService; +import org.opendaylight.mdsal.binding.api.NotificationService; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ntfbenchmark.rev150105.NtfbenchmarkService; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ntfbenchmark.rev150105.StartTestInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ntfbenchmark.rev150105.StartTestInput.ProducerType; @@ -30,11 +30,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class NtfbenchmarkProvider implements AutoCloseable, NtfbenchmarkService { - private static final Logger LOG = LoggerFactory.getLogger(NtfbenchmarkProvider.class); + private static final int TEST_TIMEOUT = 5; + private final NotificationService listenService; private final NotificationPublishService publishService; - private static final int testTimeout = 5; public NtfbenchmarkProvider(final NotificationService listenServiceDependency, final NotificationPublishService publishServiceDependency) { @@ -48,7 +48,7 @@ public class NtfbenchmarkProvider implements AutoCloseable, NtfbenchmarkService } @Override - public void close() throws Exception { + public void close() { LOG.info("NtfbenchmarkProvider closed"); } @@ -87,12 +87,12 @@ public class NtfbenchmarkProvider implements AutoCloseable, NtfbenchmarkService } executor.shutdown(); try { - executor.awaitTermination(testTimeout, TimeUnit.MINUTES); + executor.awaitTermination(TEST_TIMEOUT, TimeUnit.MINUTES); for (ListenerRegistration listenerRegistration : listeners) { listenerRegistration.getInstance().getAllDone().get(); } } catch (final InterruptedException | ExecutionException e) { - LOG.error("Out of time: test did not finish within the {} min deadline ", testTimeout); + LOG.error("Out of time: test did not finish within the {} min deadline ", TEST_TIMEOUT); } final long producerEndTime = System.nanoTime();