You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2018/06/04 17:34:03 UTC
[2/3] storm git commit: Review comments
Review comments
Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/73a343af
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/73a343af
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/73a343af
Branch: refs/heads/master
Commit: 73a343aff14a789b39a6ceb165e72354fa8999af
Parents: 3551a8b
Author: Stig Rohde Døssing <sr...@apache.org>
Authored: Sun Jun 3 11:53:43 2018 +0200
Committer: Stig Rohde Døssing <sr...@apache.org>
Committed: Sun Jun 3 11:53:43 2018 +0200
----------------------------------------------------------------------
.../org/apache/storm/messaging/netty/NettyTest.java | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/storm/blob/73a343af/storm-core/test/jvm/org/apache/storm/messaging/netty/NettyTest.java
----------------------------------------------------------------------
diff --git a/storm-core/test/jvm/org/apache/storm/messaging/netty/NettyTest.java b/storm-core/test/jvm/org/apache/storm/messaging/netty/NettyTest.java
index 5790f6c..dffbfc0 100644
--- a/storm-core/test/jvm/org/apache/storm/messaging/netty/NettyTest.java
+++ b/storm-core/test/jvm/org/apache/storm/messaging/netty/NettyTest.java
@@ -213,7 +213,7 @@ public class NettyTest {
private void doTestLargeMessage(Map<String, Object> stormConf) throws Exception {
LOG.info("3 Should send and receive a large message");
- String reqMessage = StringUtils.repeat("c", 2048000);
+ String reqMessage = StringUtils.repeat("c", 2_048_000);
IContext context = TransportFactory.makeContext(stormConf);
try {
AtomicReference<TaskMessage> response = new AtomicReference<>();
@@ -237,7 +237,7 @@ public class NettyTest {
private Map<String, Object> largeMessageConf() {
Map<String, Object> conf = basicConf();
- conf.put(Config.STORM_MESSAGING_NETTY_BUFFER_SIZE, 1024000);
+ conf.put(Config.STORM_MESSAGING_NETTY_BUFFER_SIZE, 102_400);
return conf;
}
@@ -302,7 +302,7 @@ public class NettyTest {
}
private void doTestBatch(Map<String, Object> stormConf) throws Exception {
- int numMessages = 100000;
+ int numMessages = 100_000;
LOG.info("Should send and receive many messages (testing with " + numMessages + " messages)");
ArrayList<TaskMessage> responses = new ArrayList<>();
AtomicInteger received = new AtomicInteger();
@@ -335,14 +335,20 @@ public class NettyTest {
}
}
+ private Map<String, Object> batchConf() {
+ Map<String, Object> conf = basicConf();
+ conf.put(Config.STORM_MESSAGING_NETTY_BUFFER_SIZE, 1_024_000);
+ return conf;
+ }
+
@Test
public void testBatch() throws Exception {
- doTestBatch(basicConf());
+ doTestBatch(batchConf());
}
@Test
public void testBatchWithSasl() throws Exception {
- doTestBatch(withSaslConf(basicConf()));
+ doTestBatch(withSaslConf(batchConf()));
}
private void doTestServerAlwaysReconnects(Map<String, Object> stormConf) throws Exception {