Tabnine Logo
SshEffectorTasks.requirePidRunning
Code IndexAdd Tabnine to your IDE (free)

How to use
requirePidRunning
method
in
org.apache.brooklyn.core.effector.ssh.SshEffectorTasks

Best Java code snippets using org.apache.brooklyn.core.effector.ssh.SshEffectorTasks.requirePidRunning (Showing top 2 results out of 315)

origin: org.apache.brooklyn/brooklyn-core

@Test(groups="Integration")
public void testNonRunningPidRequired() {
  ProcessTaskWrapper<?> t = submit(SshEffectorTasks.requirePidRunning(99999));
  setExpectingFailure();
  try {
    t.getTask().getUnchecked();
  } catch (Exception e) {
    log.info("The error if required PID is not found is: "+e);
    clearExpectedFailure();
    Assert.assertTrue(e.toString().contains("Process with PID"), "Expected nice clue in error but got: "+e);
  }
  checkExpectedFailure();
}
origin: org.apache.brooklyn/brooklyn-software-base

  protected void checkIsRunningAndStops(Entity mysql, SshMachineLocation lh) {
    Integer pid = getPid(mysql);
    Assert.assertNotNull(pid, "PID should be set as an attribute (or getPid() overridden to supply)");
    Entities.submit(app, SshEffectorTasks.requirePidRunning(pid).machine(lh).newTask() ).get();
    
    app.stop();

    // let the kill -1 take effect 
    Time.sleep(Duration.ONE_SECOND);
    
    // and assert it has died
    log.info("mysql in pid "+pid+" should be dead now");
    // (app has stopped, so submit on mgmt context)
    ProcessTaskWrapper<Integer> t = SshEffectorTasks.codePidRunning(pid).machine(lh).newTask();
    mgmt.getExecutionManager().submit(t);
    Assert.assertNotEquals(t.block().getExitCode(), 0);
  }
}
org.apache.brooklyn.core.effector.sshSshEffectorTasksrequirePidRunning

Javadoc

task which fails if the given PID is not running

Popular methods of SshEffectorTasks

  • ssh
  • put
  • isPidFromFileRunning
    as #codePidFromFileRunning(String) but returning boolean
  • codePidRunning
    task which returns 0 if pid is running
  • isPidRunning
    as #codePidRunning(Integer) but returning boolean
  • codePidFromFileRunning
    task which returns 0 if pid in the given file is running; method accepts wildcards so long as they m
  • getSshFlags
    extracts the values for the main brooklyn.ssh.config.* config keys (i.e. those declared in ConfigKey
  • fetch
  • requirePidFromFileRunning
    task which fails if the pid in the given file is not running (or if there is no such PID file); meth

Popular in Java

  • Start an intent from android
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • JFrame (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now