Partially revert "Fix incorrect operational state of device configuration"
[netconf.git] / apps / netconf-topology / src / test / java / org / opendaylight / netconf / topology / spi / NetconfNodeHandlerTest.java
index 6eff295ee023e173bc6e09100c455f12c852fa5d..3c6da3b4251c2941bb7b1dbdf3a6ce9e36913427 100644 (file)
@@ -195,40 +195,6 @@ public class NetconfNodeHandlerTest {
         assertEquals(2, handler.attempts());
     }
 
-    /**
-     * Tests the initialization of the NetconfNodeHandler's client configuration.
-     *
-     * <p>
-     * Ensures that no connection attempts are made by the handler after calling connect().
-     */
-    @Test
-    public void testClientConfigInitializationFailure() {
-        doNothing().when(delegate).onDeviceFailed(any(Exception.class));
-        // Creates a netconfNode without specifying a Port and Host.
-        final var netconfNode = new NetconfNodeBuilder()
-            .setReconnectOnChangedSchema(true)
-            .setSchemaless(true)
-            .setTcpOnly(true)
-            .setSleepFactor(Decimal64.valueOf("1.5"))
-            .setConcurrentRpcLimit(Uint16.ONE)
-            // One reconnection attempt
-            .setMaxConnectionAttempts(Uint32.TWO)
-            .setDefaultRequestTimeoutMillis(Uint32.valueOf(1000))
-            .setBetweenAttemptsTimeoutMillis(Uint16.valueOf(100))
-            .setKeepaliveDelay(Uint32.valueOf(1000))
-            .setConnectionTimeoutMillis(Uint32.valueOf(1000))
-            .setCredentials(new LoginPasswordBuilder().setUsername("testuser").setPassword("testpassword").build())
-            .build();
-        handler = new NetconfNodeHandler(clientDispatcher, eventExecutor, keepaliveExecutor, BASE_SCHEMAS,
-            schemaManager, processingExecutor, new DefaultNetconfClientConfigurationBuilderFactory(encryptionService,
-            credentialProvider,
-            sslHandlerFactoryProvider), deviceActionFactory, delegate, DEVICE_ID, NODE_ID,
-            netconfNode, null);
-        handler.connect();
-        // Expect 0 connection attempts since the clientConfig has not been initialized.
-        assertEquals(0, handler.attempts());
-    }
-
     @Test
     public void downAfterUpCausesReconnect() {
         // Let's borrow common bits