1
0

shutdown executorService in benchmark after each

This commit is contained in:
2024-11-28 06:04:11 +03:00
parent fd21df73dd
commit 3d0e780f07

View File

@@ -1,5 +1,6 @@
package performance;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -51,6 +52,11 @@ public class PerformanceTest {
executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
}
@AfterEach
void tearDown() {
executorService.shutdown();
}
@Test
void plainPerformanceTest() throws Exception {
var orders = benchmark(numTraders, numOrders, pairs, PlainCurrencyExchange::new, null, false);