flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hshreedha...@apache.org
Subject git commit: FLUME-2159. Remove TestNettyAvroRpcClient.spinThreadsCrazily.
Date Mon, 14 Oct 2013 22:59:33 GMT
Updated Branches:
  refs/heads/flume-1.5 4416d5b69 -> 8ea478932


FLUME-2159. Remove TestNettyAvroRpcClient.spinThreadsCrazily.

(Roshan Naik via Hari Shreedharan)


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/8ea47893
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/8ea47893
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/8ea47893

Branch: refs/heads/flume-1.5
Commit: 8ea4789326f8aa56b1947bc9e826acc8ef49d6f5
Parents: 4416d5b
Author: Hari Shreedharan <hshreedharan@apache.org>
Authored: Mon Oct 14 15:56:54 2013 -0700
Committer: Hari Shreedharan <hshreedharan@apache.org>
Committed: Mon Oct 14 15:58:39 2013 -0700

----------------------------------------------------------------------
 .../flume/api/TestNettyAvroRpcClient.java       | 45 --------------------
 1 file changed, 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/8ea47893/flume-ng-sdk/src/test/java/org/apache/flume/api/TestNettyAvroRpcClient.java
----------------------------------------------------------------------
diff --git a/flume-ng-sdk/src/test/java/org/apache/flume/api/TestNettyAvroRpcClient.java b/flume-ng-sdk/src/test/java/org/apache/flume/api/TestNettyAvroRpcClient.java
index 72e331b..bfb1fa6 100644
--- a/flume-ng-sdk/src/test/java/org/apache/flume/api/TestNettyAvroRpcClient.java
+++ b/flume-ng-sdk/src/test/java/org/apache/flume/api/TestNettyAvroRpcClient.java
@@ -333,49 +333,4 @@ public class TestNettyAvroRpcClient {
     RpcTestUtils.handlerBatchAppendTest(new ThrowingAvroHandler());
     logger.error("Throwing: I should never have gotten here!");
   }
-
-  @Test
-  public void spinThreadsCrazily() throws IOException {
-
-    int initThreadCount = ManagementFactory.getThreadMXBean().getThreadCount();
-
-    // find a port we know is closed by opening a free one then closing it
-    ServerSocket sock = new ServerSocket(0);
-    int port = sock.getLocalPort();
-    sock.close();
-
-    Properties props = new Properties();
-    props.put(RpcClientConfigurationConstants.CONFIG_CLIENT_TYPE,
-        RpcClientConfigurationConstants.DEFAULT_CLIENT_TYPE);
-    props.put(RpcClientConfigurationConstants.CONFIG_HOSTS, "h1");
-    props.put(RpcClientConfigurationConstants.CONFIG_HOSTS_PREFIX + "h1",
-        "localhost:" + port);
-    props.put(RpcClientConfigurationConstants.CONFIG_CONNECT_TIMEOUT, "20");
-    props.put(RpcClientConfigurationConstants.CONFIG_REQUEST_TIMEOUT, "20");
-    props.put(RpcClientConfigurationConstants.CONFIG_BATCH_SIZE, "1");
-
-    for (int i = 0; i < 1000; i++) {
-      RpcClient client = null;
-      try {
-        client = RpcClientFactory.getDefaultInstance("localhost", port);
-        client.append(EventBuilder.withBody("Hello", Charset.forName("UTF-8")));
-      } catch (FlumeException e) {
-        logger.warn("Unexpected error", e);
-      } catch (EventDeliveryException e) {
-        logger.warn("Expected error", e);
-      } finally {
-        if (client != null) {
-          client.close();
-        }
-      }
-    }
-
-    int threadCount = ManagementFactory.getThreadMXBean().getThreadCount();
-    logger.warn("Init thread count: {}, thread count: {}",
-        initThreadCount, threadCount);
-    Assert.assertEquals("Thread leak in RPC client",
-        initThreadCount, threadCount);
-
-  }
-
 }


Mime
View raw message