@Test(groups="Integration") public void testRequirePidFromFileOnSuccessAcceptsWildcards() throws IOException { File f = File.createTempFile("testBrooklynPid", ".pid"); Files.write( (""+getMyPid()).getBytes(), f ); ProcessTaskWrapper<?> t = submit(SshEffectorTasks.requirePidFromFileRunning(f.getPath()+"*")); t.getTask().getUnchecked(); }
public static SshEffectorTaskFactory<?> requirePidFromFileRunning(String pidFile) { return codePidFromFileRunning(pidFile) .summary("PID file "+pidFile+" is-running check (required)") .requiringExitCodeZero("Process with PID from file "+pidFile+" is required to be running"); }
SshEffectorTasks { public static SshEffectorTaskFactory<?> requirePidFromFileRunning(String pidFile) { return codePidFromFileRunning(pidFile) .summary("PID file "+pidFile+" is-running check (required)") .requiringExitCodeZero("Process with PID from file "+pidFile+" is required to be running"); } }
SshEffectorTasks { public static SshEffectorTaskFactory<?> requirePidFromFileRunning(String pidFile) { return codePidFromFileRunning(pidFile) .summary("PID file "+pidFile+" is-running check (required)") .requiringExitCodeZero("Process with PID from file "+pidFile+" is required to be running"); }  }
SshEffectorTasks { public static SshEffectorTaskFactory<?> requirePidFromFileRunning(String pidFile) { return codePidFromFileRunning(pidFile) .summary("PID file "+pidFile+" is-running check (required)") .requiringExitCodeZero("Process with PID from file "+pidFile+" is required to be running"); }  static SshEffectorTaskFactory<Integer> ssh(SshMachineLocation machine, String ...commands); static SshEffectorTaskFactory<Integer> ssh(String ...commands); static SshEffectorTaskFactory<Integer> ssh(List<String> commands); static SshPutTaskFactory put(String remoteFile); static SshFetchEffectorTaskFactory fetch(String remoteFile); static SshEffectorTaskFactory<Integer> codePidRunning(Integer pid); static SshEffectorTaskFactory<?> requirePidRunning(Integer pid); static SshEffectorTaskFactory<Boolean> isPidRunning(Integer pid); static SshEffectorTaskFactory<Integer> codePidFromFileRunning(final String pidFile); static SshEffectorTaskFactory<?> requirePidFromFileRunning(String pidFile); static SshEffectorTaskFactory<Boolean> isPidFromFileRunning(String pidFile); @Beta static Map<String, Object> getSshFlags(Entity entity, Location optionalLocation); }
SshEffectorTasks { public static SshEffectorTaskFactory<?> requirePidFromFileRunning(String pidFile) { return codePidFromFileRunning(pidFile) .summary("PID file "+pidFile+" is-running check (required)") .requiringExitCodeZero("Process with PID from file "+pidFile+" is required to be running"); }  static SshEffectorTaskFactory<Integer> ssh(SshMachineLocation machine, String ...commands); static SshEffectorTaskFactory<Integer> ssh(String ...commands); static SshEffectorTaskFactory<Integer> ssh(List<String> commands); static SshPutTaskFactory put(String remoteFile); static SshFetchEffectorTaskFactory fetch(String remoteFile); static SshEffectorTaskFactory<Integer> codePidRunning(Integer pid); static SshEffectorTaskFactory<?> requirePidRunning(Integer pid); static SshEffectorTaskFactory<Boolean> isPidRunning(Integer pid); static SshEffectorTaskFactory<Integer> codePidFromFileRunning(final String pidFile); static SshEffectorTaskFactory<?> requirePidFromFileRunning(String pidFile); static SshEffectorTaskFactory<Boolean> isPidFromFileRunning(String pidFile); @Beta static Map<String, Object> getSshFlags(Entity entity, Location optionalLocation); static final ConfigKey<Boolean> IGNORE_ENTITY_SSH_FLAGS; }