Package org.sonatype.nexus.client.core.subsystem.routing

Examples of org.sonatype.nexus.client.core.subsystem.routing.Status


  @Test
  public void checkDiscoveryOnBlockedProxyRepository()
      throws InterruptedException
  {
    try {
      final Status statusBefore = routing().getStatus("central");
      assertThat(statusBefore.getPublishedStatus(), equalTo(Outcome.SUCCEEDED));
      assertThat(statusBefore.getDiscoveryStatus().getDiscoveryLastStatus(), equalTo(Outcome.SUCCEEDED));

      // block it
      repositories().get(ProxyRepository.class, "central").block().save();
      routing().updatePrefixFile("central");
      routingTest().waitForAllRoutingUpdateJobToStop();
      // waitForWLDiscoveryOutcome( "central" );

      // recheck
      final Status statusAfter = routing().getStatus("central");
      assertThat(statusAfter.getPublishedStatus(), equalTo(Outcome.SUCCEEDED));
      assertThat(statusAfter.getDiscoveryStatus().getDiscoveryLastStatus(), equalTo(Outcome.FAILED));
      assertThat(statusAfter.getDiscoveryStatus().getDiscoveryLastMessage(), containsString("blocked"));
    }
    finally {
      repositories().get(ProxyRepository.class, "central").unblock().save();
    }
  }
View Full Code Here


    routing().getStatus("no-such-repo-id");
  }

  @Test
  public void getReleaseStatus() {
    final Status status = routing().getStatus("releases");
    assertThat(status, is(not(nullValue())));
    assertThat(status.getPublishedStatus(), equalTo(Status.Outcome.SUCCEEDED));
    assertThat(status.getPublishedMessage(), is(notNullValue()));
    assertThat(status.getPublishedTimestamp(), greaterThan(0L));
    assertThat(status.getPublishedUrl(), is(notNullValue()));
  }
View Full Code Here

    assertThat(status.getPublishedUrl(), is(notNullValue()));
  }

  @Test
  public void getSnapshotsStatus() {
    final Status status = routing().getStatus("snapshots");
    assertThat(status, is(not(nullValue())));
    assertThat(status.getPublishedStatus(), equalTo(Status.Outcome.SUCCEEDED));
    assertThat(status.getPublishedMessage(), is(notNullValue()));
    assertThat(status.getPublishedTimestamp(), greaterThan(0L));
    assertThat(status.getPublishedUrl(), is(notNullValue()));
  }
View Full Code Here

                message.getDiscovery().getDiscoveryLastMessage(),
                message.getDiscovery().getDiscoveryLastRunTimestamp());
      }

      final Outcome publishOutcome = Outcome.values()[message.getPublishedStatus() + 1];
      return new Status(publishOutcome, message.getPublishedMessage(), message.getPublishedTimestamp(),
          message.getPublishedUrl(), discoveryStatus);
    }
    catch (UniformInterfaceException e) {
      throw getNexusClient().convert(e);
    }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.client.core.subsystem.routing.Status

Copyright © 2018 www.massapicom. 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.