@Test public void testRemoveProcessor() throws InterruptedException { when(taskProcessor.process(abstractTask)).thenReturn(true); taskManager.addProcessor("test", testTaskProcessor); taskManager.removeProcessor("test"); taskManager.addTask("test", abstractTask); TimeUnit.MILLISECONDS.sleep(200); verify(testTaskProcessor, never()).process(abstractTask); verify(taskProcessor).process(abstractTask); }
@Override public void addTask(Object key, AbstractDelayTask newTask) { super.addTask(key, newTask); MetricsMonitor.getDumpTaskMonitor().set(tasks.size()); }
TaskManager extends NacosDelayTaskExecuteEngine implements TaskManagerMBean { @Override public void addTask(Object key, AbstractDelayTask newTask) { super.addTask(key, newTask); MetricsMonitor.getDumpTaskMonitor().set(tasks.size()); } }
TaskManager extends NacosDelayTaskExecuteEngine implements TaskManagerMBean { @Override public void addTask(Object key, AbstractDelayTask newTask) { super.addTask(key, newTask); MetricsMonitor.getDumpTaskMonitor().set(tasks.size()); } TaskManager();  TaskManager(String name); }
TaskManager extends NacosDelayTaskExecuteEngine implements TaskManagerMBean { @Override public void addTask(Object key, AbstractDelayTask newTask) { super.addTask(key, newTask); MetricsMonitor.getDumpTaskMonitor().set(tasks.size()); } TaskManager();  TaskManager(String name); void close(); void await(); boolean await(long timeout, TimeUnit unit); @Override void addTask(Object key, AbstractDelayTask newTask); @Override AbstractDelayTask removeTask(Object key); @Override String getTaskInfos(); void init(); }
TaskManager extends NacosDelayTaskExecuteEngine implements TaskManagerMBean { @Override public void addTask(Object key, AbstractDelayTask newTask) { super.addTask(key, newTask); MetricsMonitor.getDumpTaskMonitor().set(tasks.size()); } TaskManager();  TaskManager(String name); void close(); void await(); boolean await(long timeout, TimeUnit unit); @Override void addTask(Object key, AbstractDelayTask newTask); @Override AbstractDelayTask removeTask(Object key); @Override String getTaskInfos(); void init();  }