Closed Happy0 closed 5 years ago
To stop the vertx event loop timing out on futures that are waiting seconds for their turn for their message to be written, I had to change the test to just block on each write to reproduce this:
public void postMessageTest(@VertxInstance Vertx vertx) throws Exception {
RPCHandler rpcHandler = makeRPCHandler(vertx);
for (int i = 0; i < 10000; i++) {
// Note: in a real use case, this would more likely be a Java class with these fields
HashMap<String, String> params = new HashMap<>();
params.put("type", "post");
params.put("text", "test test " + i);
RPCAsyncRequest asyncRequest = new RPCAsyncRequest(new RPCFunction("publish"), Arrays.asList(params));
AsyncResult<RPCMessage> rpcMessageAsyncResult = rpcHandler.makeAsyncRequest(asyncRequest);
System.out.println(rpcMessageAsyncResult.get());
}
}
When consuming a scuttlebutt stream, there are periodic sodium
OutOfMemory
exception errors while decrypting the messages received as responses from the server for random messages received:Steps to reproduce:
postMessageTest
test in thePatchworkIntegrationText
file in the mux test package to post 20,000 messages by changing the for loop to iterate more and run the test. I'm not sure the minimum number of items in a stream required to make the error happen.streamTest
test in thePatchworkIntegrationTest
file in the mux package.