From 991d81a04af7f0ab27196a59bb4c1305765ad332 Mon Sep 17 00:00:00 2001 From: guoz <763366136@qq.com> Date: Thu, 22 Sep 2022 17:58:14 +0800 Subject: [PATCH] Revert "add ConfigExecutorTest test case" This reverts commit ffc00ff4 --- .../base/ThreadPoolAdapterBeanContainer.java | 8 ++---- .../config/toolkit/ConfigExecutorTest.java | 25 ------------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapterBeanContainer.java b/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapterBeanContainer.java index 6dc777d2..0688192d 100644 --- a/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapterBeanContainer.java +++ b/hippo4j-adapter/hippo4j-adapter-base/src/main/java/cn/hippo4j/adapter/base/ThreadPoolAdapterBeanContainer.java @@ -17,9 +17,7 @@ package cn.hippo4j.adapter.base; -/* import cn.hippo4j.common.config.ApplicationContextHolder; -*/ import com.google.common.collect.Maps; import org.springframework.beans.factory.InitializingBean; @@ -37,9 +35,7 @@ public class ThreadPoolAdapterBeanContainer implements InitializingBean { @Override public void afterPropertiesSet() throws Exception { - /* - * Map threadPoolAdapterMap = ApplicationContextHolder.getBeansOfType(ThreadPoolAdapter.class); threadPoolAdapterMap.forEach((key, val) -> - * THREAD_POOL_ADAPTER_BEAN_CONTAINER.put(val.mark(), val)); - */ + Map threadPoolAdapterMap = ApplicationContextHolder.getBeansOfType(ThreadPoolAdapter.class); + threadPoolAdapterMap.forEach((key, val) -> THREAD_POOL_ADAPTER_BEAN_CONTAINER.put(val.mark(), val)); } } diff --git a/hippo4j-config/src/test/java/cn/hippo4j/config/toolkit/ConfigExecutorTest.java b/hippo4j-config/src/test/java/cn/hippo4j/config/toolkit/ConfigExecutorTest.java index cf9f50d8..4864cd7d 100644 --- a/hippo4j-config/src/test/java/cn/hippo4j/config/toolkit/ConfigExecutorTest.java +++ b/hippo4j-config/src/test/java/cn/hippo4j/config/toolkit/ConfigExecutorTest.java @@ -17,33 +17,8 @@ package cn.hippo4j.config.toolkit; -import cn.hippo4j.config.service.LongPollingService; -import cn.hutool.core.thread.ThreadUtil; -import lombok.extern.slf4j.Slf4j; -import org.junit.Test; - -import javax.servlet.AsyncContext; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.TimeUnit; - /** * ConfigExecutor Test */ -@Slf4j public class ConfigExecutorTest { - - @Test - public void executeLongPollingTest() { - ConfigExecutor.executeLongPolling(() -> log.info(Thread.currentThread().getName())); - } - - @Test - public void scheduleLongPollingTest() { - ConfigExecutor.scheduleLongPolling(() -> log.info(Thread.currentThread().getName()), 5, TimeUnit.SECONDS); - } - - @Test - public void scheduleLongPollingInitialTest() { - ConfigExecutor.scheduleLongPolling(() -> log.info(Thread.currentThread().getName()), 0, 5, TimeUnit.SECONDS); - } }