refactor(LocalRunnerClient): allow injecting action watch path

Context:
The hardcoded action watch path made LocalRunnerClient difficult to test and
tightened it to a specific runtime layout. Injecting the watch path improves
testability and allows the runner to work in different runtime environments.
This commit is contained in:
2025-12-16 21:02:29 +08:00
parent d546148d69
commit ad58c0cc7c
3 changed files with 12 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ public class SystemTest {
void localRunnerClientTest() {
Map<String, MetaActionInfo> existedMetaActions = new HashMap<>();
ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor();
RunnerClient client = new LocalRunnerClient(existedMetaActions, executor);
RunnerClient client = new LocalRunnerClient(existedMetaActions, executor, null);
JSONObject res = client.listSysDependencies();
System.out.println(res.toString());
}