Examples of Prober


Examples of org.mule.tck.probe.Prober

        assertStatus(app, status);
    }

    private void assertStatus(final Application application, final ApplicationStatus status)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        prober.check(new JUnitProbe()
        {
            @Override
            protected boolean test() throws Exception
            {
                assertThat(application.getStatus(), is(status));
View Full Code Here

Examples of org.mule.tck.probe.Prober

    }

    private void assertDeploymentFailure(final DeploymentListener listener, final String artifactName, final VerificationMode mode)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        prober.check(new Probe()
        {
            public boolean isSatisfied()
            {
                try
                {
View Full Code Here

Examples of org.mule.tck.probe.Prober

    private void assertNoDeploymentInvoked(final DeploymentListener deploymentListener)
    {
        //TODO(pablo.kraan): look for a better way to test this
        boolean invoked;
        Prober prober = new PollingProber(DeploymentDirectoryWatcher.DEFAULT_CHANGES_CHECK_INTERVAL_MS * 2, 100);
        try
        {
            prober.check(new Probe()
            {
                public boolean isSatisfied()
                {
                    try
                    {
View Full Code Here

Examples of org.mule.tck.probe.Prober

        return new File(artifactDir, anchorFileName);
    }

    private void assertAppFolderIsDeleted(String appName)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        File appFolder = new File(appsDir, appName);
        prober.check(new FileDoesNotExists(appFolder));
    }
View Full Code Here

Examples of org.mule.tck.probe.Prober

        assetArtifactFolderIsMaintained(domainName, domainsDir);
    }

    private void assetArtifactFolderIsMaintained(String artifactName, File artifactDir)
    {
        Prober prober = new PollingProber(DEPLOYMENT_TIMEOUT, 100);
        File appFolder = new File(artifactDir, artifactName);
        prober.check(new FileExists(appFolder));
    }
View Full Code Here

Examples of org.robotninjas.barge.utils.Prober

   * @param increments value expected for counter.
   * @param timeout    timeout in ms.
   * @throws IllegalStateException if {@code expected} is not reached at end of timeout.
   */
  public void waitForValue(final int increments, long timeout) {
    new Prober(new Callable<Boolean>() {
        @Override
        public Boolean call() throws Exception {
          return increments == counter;
        }
      }).probe(timeout);
View Full Code Here

Examples of org.robotninjas.barge.utils.Prober

      counter.waitForValue(target, timeout);
    }
  }

  void waitForLeaderElection() throws InterruptedException {
    new Prober(new Callable<Boolean>() {
        @Override
        public Boolean call() throws Exception {
          return thereIsOneLeader();
        }
      }).probe(10000);
View Full Code Here

Examples of org.robotninjas.barge.utils.Prober

    client.target(uris[0]).path("/raft/init").request().post(Entity.json(""));
    client.target(uris[1]).path("/raft/init").request().post(Entity.json(""));
    client.target(uris[2]).path("/raft/init").request().post(Entity.json(""));

    new Prober(new Callable<Boolean>() {
        @Override
        public Boolean call() throws Exception {
          return isLeader(client, uris[0]) || isLeader(client, uris[1]) || isLeader(client, uris[2]);
        }
      }).probe(10000);
View Full Code Here

Examples of org.robotninjas.barge.utils.Prober

    ClientUpgradeRequest request = new ClientUpgradeRequest();
    wsClient.connect(socket, wsEvents, request);

    client.target(uri).path("/raft/init").request().post(Entity.json(""));

    new Prober(new Callable<Boolean>() {
        @Override
        public Boolean call() throws Exception {
          return Iterables.any(socket.messages, Predicates.contains(Pattern.compile(".*FOLLOWER.*")));
        }
      }).probe(10000);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.