clebertsuconic commented on code in PR #5338: URL: https://github.com/apache/activemq-artemis/pull/5338#discussion_r1838154347
########## tests/soak-tests/src/test/java/org/apache/activemq/artemis/tests/soak/interruptlm/ClusteredLargeMessageInterruptTest.java: ########## @@ -289,57 +268,51 @@ private void testInterrupt(String protocol, boolean tx, boolean useKill) throws ExecutorService executorService = Executors.newFixedThreadPool(SENDING_THREADS + CONSUMING_THREADS); runAfter(executorService::shutdownNow); - CountDownLatch sendDone = startSendingThreads(executorService, protocol, 0, SENDING_THREADS, tx, queueName); - CountDownLatch receiverDone = startConsumingThreads(executorService, protocol, 0, CONSUMING_THREADS, tx, queueName); - - Thread.sleep(2000); - - killProcess(serverProcess, useKill); - runningSend = false; - runningConsumer = false; - assertTrue(serverProcess.waitFor(10, TimeUnit.SECONDS)); - assertTrue(receiverDone.await(10, TimeUnit.SECONDS)); - assertTrue(sendDone.await(10, TimeUnit.SECONDS)); - - logger.info("All receivers and senders are done!!!"); - - serverProcess = startServer0(); - - Thread.sleep(2000); - - sendDone = startSendingThreads(executorService, protocol, 1, SENDING_THREADS, tx, queueName); - receiverDone = startConsumingThreads(executorService, protocol, 1, CONSUMING_THREADS, tx, queueName); - - killProcess(serverProcess2, useKill); - assertTrue(serverProcess2.waitFor(10, TimeUnit.SECONDS)); - runningSend = false; - runningConsumer = false; - assertTrue(sendDone.await(1, TimeUnit.MINUTES)); - assertTrue(receiverDone.await(10, TimeUnit.SECONDS)); - - serverProcess2 = startServer1(); - - sendDone = startSendingThreads(executorService, protocol, 1, SENDING_THREADS, tx, queueName); - receiverDone = startConsumingThreads(executorService, protocol, 1, CONSUMING_THREADS, tx, queueName); - - Thread.sleep(2000); - runningSend = false; - assertTrue(sendDone.await(10, TimeUnit.SECONDS)); - - QueueControl queueControl1 = getQueueControl(server1URI, builderServer1, queueName, queueName, RoutingType.ANYCAST, 5000); - QueueControl queueControl2 = getQueueControl(server2URI, builderServer2, queueName, queueName, RoutingType.ANYCAST, 5000); - File lmFolder = new File(getServerLocation(SERVER_NAME_0) + "/data/large-messages"); File lmFolder2 = new File(getServerLocation(SERVER_NAME_1) + "/data/large-messages"); - Wait.waitFor(() -> queueControl1.getMessageCount() == 0 && queueControl2.getMessageCount() == 0 && lmFolder.listFiles().length == 0 && lmFolder2.listFiles().length == 0); + { + CountDownLatch sendDone = startSendingThreads(executorService, protocol, 0, SENDING_THREADS, tx, queueName); + CountDownLatch receiverDone = startConsumingThreads(executorService, protocol, 1, CONSUMING_THREADS, tx, queueName); + + // let it producing for a while + Thread.sleep(2000); + + runningSend = false; + assertTrue(sendDone.await(10, TimeUnit.SECONDS)); + + killProcess(serverProcess); + assertTrue(serverProcess.waitFor(1, TimeUnit.MINUTES)); + serverProcess = startServer0(); + runningConsumer = false; + assertTrue(receiverDone.await(10, TimeUnit.SECONDS)); + + SimpleManagement simpleManagement1 = new SimpleManagement("tcp://localhost:61716", null, null); + runAfter(simpleManagement1::close); Review Comment: I used it at some point.. and removed it.. .thanks.. taking it out. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact