瀏覽代碼

dashboard: update InMemoryMetricsRepositoryTest

Signed-off-by: Eric Zhao <sczyh16@gmail.com>
master
Eric Zhao 5 年之前
父節點
當前提交
226589f773
共有 1 個檔案被更改,包括 2 行新增4 行删除
  1. +2
    -4
      sentinel-dashboard/src/test/java/com/alibaba/csp/sentinel/dashboard/repository/metric/InMemoryMetricsRepositoryTest.java

+ 2
- 4
sentinel-dashboard/src/test/java/com/alibaba/csp/sentinel/dashboard/repository/metric/InMemoryMetricsRepositoryTest.java 查看文件

@@ -37,8 +37,6 @@ import static org.junit.Assert.*;
*/
public class InMemoryMetricsRepositoryTest {

private static final int AVAILABLE_CPU_PROCESSORS = Runtime.getRuntime().availableProcessors();

private static final String DEFAULT_APP = "default";
private static final String DEFAULT_EXPIRE_APP = "default_expire_app";
private static final String DEFAULT_RESOURCE = "test";
@@ -51,7 +49,7 @@ public class InMemoryMetricsRepositoryTest {
@Before
public void setUp() throws Exception {
inMemoryMetricsRepository = new InMemoryMetricsRepository();
executorService = Executors.newFixedThreadPool(AVAILABLE_CPU_PROCESSORS);
executorService = Executors.newFixedThreadPool(8);
}

@After
@@ -112,7 +110,7 @@ public class InMemoryMetricsRepositoryTest {
List<CompletableFuture> futures = Lists.newArrayList();

// concurrent query resources of app
final CyclicBarrier cyclicBarrier = new CyclicBarrier(AVAILABLE_CPU_PROCESSORS);
final CyclicBarrier cyclicBarrier = new CyclicBarrier(8);
for (int j = 0; j < 10000; j++) {
futures.add(
CompletableFuture.runAsync(() -> {


Loading…
取消
儲存