SystemTaskExecutor { @VisibleForTesting ExecutionConfig getExecutionConfig(String taskQueue) { if (!QueueUtils.isIsolatedQueue(taskQueue)) { return this.defaultExecutionConfig; } return queueExecutionConfigMap.computeIfAbsent(taskQueue, __ -> this.createExecutionConfig()); } SystemTaskExecutor(QueueDAO queueDAO, WorkflowExecutor workflowExecutor, Configuration config, ExecutionService executionService);   }
@Test public void testGetExecutionConfigForSystemTask() { System.setProperty("workflow.system.task.worker.thread.count", "5"); Configuration configuration = new SystemPropertiesConfiguration(); systemTaskExecutor = new SystemTaskExecutor(queueDAO, workflowExecutor, configuration, executionService); assertEquals(systemTaskExecutor.getExecutionConfig("").getSemaphoreUtil().availableSlots(), 5); }
@Test public void testGetExecutionConfigForIsolatedSystemTask() { System.setProperty("workflow.isolated.system.task.worker.thread.count", "7"); Configuration configuration = new SystemPropertiesConfiguration(); systemTaskExecutor = new SystemTaskExecutor(queueDAO, workflowExecutor, configuration, executionService); assertEquals(systemTaskExecutor.getExecutionConfig("test-iso").getSemaphoreUtil().availableSlots(), 7); }