From a2336354d965b83a14b21b2ad248a09c52352399 Mon Sep 17 00:00:00 2001 From: tjq Date: Mon, 18 May 2020 12:21:33 +0800 Subject: [PATCH] [fix] suit ScriptProcessor's API change --- .../com/github/kfcfans/oms/worker/common/OhMyConfig.java | 2 +- .../java/com/github/kfcfans/oms/ScriptProcessorTest.java | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/oh-my-scheduler-worker/src/main/java/com/github/kfcfans/oms/worker/common/OhMyConfig.java b/oh-my-scheduler-worker/src/main/java/com/github/kfcfans/oms/worker/common/OhMyConfig.java index 3703d83d..05169181 100644 --- a/oh-my-scheduler-worker/src/main/java/com/github/kfcfans/oms/worker/common/OhMyConfig.java +++ b/oh-my-scheduler-worker/src/main/java/com/github/kfcfans/oms/worker/common/OhMyConfig.java @@ -18,7 +18,7 @@ public class OhMyConfig { */ private String appName; /** - * 调度服务器地址,ip:port + * 调度服务器地址,ip:port 或 域名 */ private List serverAddress; /** diff --git a/oh-my-scheduler-worker/src/test/java/com/github/kfcfans/oms/ScriptProcessorTest.java b/oh-my-scheduler-worker/src/test/java/com/github/kfcfans/oms/ScriptProcessorTest.java index 59080608..7e13621c 100644 --- a/oh-my-scheduler-worker/src/test/java/com/github/kfcfans/oms/ScriptProcessorTest.java +++ b/oh-my-scheduler-worker/src/test/java/com/github/kfcfans/oms/ScriptProcessorTest.java @@ -16,26 +16,25 @@ import java.util.concurrent.Executors; public class ScriptProcessorTest { private static final long timeout = 10000; - private static final ExecutorService pool = Executors.newFixedThreadPool(3); @Test public void testLocalShellProcessor() throws Exception { - ShellProcessor sp = new ShellProcessor(1L, "ls -a", timeout, pool); + ShellProcessor sp = new ShellProcessor(1L, "ls -a", timeout); sp.process(null); - ShellProcessor sp2 = new ShellProcessor(2777L, "pwd", timeout, pool); + ShellProcessor sp2 = new ShellProcessor(2777L, "pwd", timeout); sp2.process(null); } @Test public void testLocalPythonProcessor() throws Exception { - PythonProcessor pp = new PythonProcessor(2L, "print 'Hello World!'", timeout, pool); + PythonProcessor pp = new PythonProcessor(2L, "print 'Hello World!'", timeout); pp.process(null); } @Test public void testNetShellProcessor() throws Exception { - ShellProcessor sp = new ShellProcessor(18L, "http://localhost:8080/test/test.sh", timeout, pool); + ShellProcessor sp = new ShellProcessor(18L, "http://localhost:8080/test/test.sh", timeout); sp.process(null); }