Package org.sonatype.tests.http.server.fluent

Examples of org.sonatype.tests.http.server.fluent.Server.stop()


            containsInAnyOrder(ORG_SOMEORG_ARTIFACT_10_POM, ORG_SOMEORG_ARTIFACT_10_POM + ".sha1",
                ORG_SOMEORG_ARTIFACT_10_JAR, ORG_SOMEORG_ARTIFACT_10_JAR + ".sha1"));
      }
    }
    finally {
      server.stop();
    }
  }

  /**
   * A proxy "transitions" from having prefixes file to not having prefixes file (and not being scraped either). The
View Full Code Here


                ORG_SOMEORG_ARTIFACT_10_JAR, ORG_SOMEORG_ARTIFACT_10_JAR + ".sha1", FLUKE_ARTIFACT_POM,
                FLUKE_ARTIFACT_JAR));
      }
    }
    finally {
      server.stop();
    }
  }

  // ==
View Full Code Here

            repository.getLocalStorage().listItems(repository, new ResourceStoreRequest("/.nexus/tmp")),
            is(empty()));
      }
    }
    finally {
      server.stop();
    }
  }

  public static class DropConnection
      implements Behaviour
View Full Code Here

    RepositoryStatusResource status = util.getStatus(getTestRepositoryId());

    Assert.assertEquals("Repository should be auto-blocked", status.getProxyMode(), ProxyMode.BLOCKED_AUTO.name());

    // stop the error server, start the healthy server
    return500Server.stop();
    serverResource.getServerProvider().start();

    // unblock it manually
    // NEXUS-4410: since this issue is implemented, the lines below are not enough,
    // since NFC will still contain the artifact do be downloaded, so we need to make it manually blocked and then allow proxy
View Full Code Here

      assertThat(page.getUrl(), equalTo(repoRootUrl));
      assertThat(page.getHttpResponse().getStatusLine().getStatusCode(), equalTo(200));
      assertThat(page.getDocument(), notNullValue());
    }
    finally {
      server.stop();
    }
  }

  @Test
  public void error404WithBody() throws Exception {
View Full Code Here

      assertThat(page.getUrl(), equalTo(repoRootUrl));
      assertThat(page.getHttpResponse().getStatusLine().getStatusCode(), equalTo(404));
      assertThat(page.getDocument(), notNullValue());
    }
    finally {
      server.stop();
    }
  }

  @Test(expected = UnexpectedPageResponse.class)
  public void error500IsException() throws Exception {
View Full Code Here

      final String repoRootUrl = server.getUrl().toString() + "/foo/bar/";
      final PageContext context = new PageContext(new DefaultHttpClient());
      final Page page = Page.getPageFor(context, repoRootUrl);
    }
    finally {
      server.stop();
    }
  }

  @Test(expected = SocketException.class)
  public void errorConnectionRefusedException() throws Exception {
View Full Code Here

    server.start();
    try {
      repoRootUrl = server.getUrl().toString() + "/foo/bar/";
    }
    finally {
      server.stop();
    }
    final PageContext context = new PageContext(new DefaultHttpClient());
    final Page page = Page.getPageFor(context, repoRootUrl);
  }
}
View Full Code Here

              e.getCause());
          Assert.assertEquals(RemoteStorageTransportOverloadedException.class, e.getCause().getClass());
        }
      }
      finally {
        server.stop();
      }
    }
    finally {
      if (httpClientFactory != null) {
        httpClientFactory.shutdown();
View Full Code Here

      assertThat(entries, notNullValue());
      assertThat(entries.size(), equalTo(2));
      assertThat(entries, contains("/com/foo", "/com/bar"));
    }
    finally {
      server.stop();
    }
  }

  @Test
  public void simple403()
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.