Fix unstable test for NetconfDeviceCommunicator 15/93715/5
authorVladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Tue, 10 Nov 2020 11:47:34 +0000 (13:47 +0200)
committerOleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
Tue, 16 Feb 2021 11:49:00 +0000 (13:49 +0200)
The root cause of the issue is that this test requires more time for
verification on Windows-type OS, and sometimes that was a reason for
test failure.

JIRA: NETCONF-760
Change-Id: I7aab0f89fe4c466e2cdf772afffe3d54eb0f19df
Signed-off-by: Vladyslav Marchenko <vladyslav.marchenko@pantheon.tech>
Signed-off-by: Oleksii Mozghovyi <oleksii.mozghovyi@pantheon.tech>
netconf/sal-netconf-connector/src/test/java/org/opendaylight/netconf/sal/connect/netconf/listener/NetconfDeviceCommunicatorTest.java

index 8c9c0e7d1d42156a48db1f93569a8a410437b093..cd3dae30af1c73e93c33ab03595bb9689f74ac7f 100644 (file)
@@ -384,7 +384,7 @@ public class NetconfDeviceCommunicatorTest {
      * Test whether reconnect is scheduled properly.
      */
     @Test
-    public void testNetconfDeviceReconnectInCommunicator() throws Exception {
+    public void testNetconfDeviceReconnectInCommunicator() {
         final RemoteDevice<NetconfSessionPreferences, NetconfMessage, NetconfDeviceCommunicator> device =
                 mock(RemoteDevice.class);
 
@@ -428,7 +428,7 @@ public class NetconfDeviceCommunicatorTest {
             listener.initializeRemoteConnection(new NetconfClientDispatcherImpl(group, group, time), cfg);
 
             verify(reconnectStrategy,
-                    timeout((int) TimeUnit.MINUTES.toMillis(3)).times(101)).scheduleReconnect(any(Throwable.class));
+                    timeout(TimeUnit.MINUTES.toMillis(4)).times(101)).scheduleReconnect(any(Throwable.class));
         } finally {
             time.stop();
             group.shutdownGracefully();