java/kudu-client/src/test/java/org/apache/kudu/client/TestKuduClient.java
@Test(timeout = 100000)
  public void testCloseShortlyAfterOpen() throws Exception {
    CapturingLogAppender cla = new CapturingLogAppender();
    try (Closeable c = cla.attach()) {
      try (KuduClient localClient = new KuduClient.KuduClientBuilder(masterAddresses).build()) {
        // Force the client to connect to the masters.
        localClient.exportAuthenticationCredentials();
      }
    }
    // Ensure there is no log spew due to an unexpected lost connection.
    String exception_text = cla.getAppendedText();
    assertFalse("Unexpected exception:\n" + exception_text,
               exception_text.contains("lost connection to peer"));
  }
/**
   * Regression test for some log spew which occurred in short-lived client instances which
   * had outbound connections.
   */
Regression test for some log spew which occurred in short-lived client instances which
had outbound connections.
Regression test for some log spew which occurred in short - lived client instances which had outbound connections .
@Test(timeout = 100000)
  public void testCloseShortlyAfterOpen() throws Exception {
    CapturingLogAppender cla = new CapturingLogAppender();
    try (Closeable c = cla.attach()) {
      try (KuduClient localClient = new KuduClient.KuduClientBuilder(masterAddresses).build()) {
        localClient.exportAuthenticationCredentials();
      }
    }
    String exception_text = cla.getAppendedText();
    assertFalse("Unexpected exception:\n" + exception_text,
               exception_text.contains("lost connection to peer"));
  }
@ Test ( timeout = 100000 ) public void testCloseShortlyAfterOpen ( ) throws Exception { CapturingLogAppender cla = new CapturingLogAppender ( ) ; try ( Closeable c = cla . attach ( ) ) { try ( KuduClient localClient = new KuduClient . KuduClientBuilder ( masterAddresses ) . build ( ) ) { localClient . exportAuthenticationCredentials ( ) ; } } String exception_text = cla . getAppendedText ( ) ; assertFalse ( "Unexpected exception:\n" + exception_text , exception_text . contains ( "lost connection to peer" ) ) ; }
Regression test for some log spew which occurred in short-lived client instances which
 had outbound connections.
Regression test for some log spew which occurred in short - lived client instances which had outbound connections .
// Force the client to connect to the masters. // Ensure there is no log spew due to an unexpected lost connection.