// check for auto block
// TODO: interestingly RepositoryMessageUtil.getStatus() neglects JSON here, so
// not using it and switched back to XML as it is wired in it this util class.
RepositoryMessageUtil util = new RepositoryMessageUtil(this.getXMLXStream(), MediaType.APPLICATION_XML);
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
// those steps DOES clean NFC
status.setProxyMode(ProxyMode.BLOCKED_MANUAL.name());
util.updateStatus(status);
status.setProxyMode(ProxyMode.ALLOW.name());
util.updateStatus(status);
// and now, all should go well
downloadArtifact(getNexusTestRepoUrl(),
"nexus1111", "artifact", "1.1", "jar", null, "target/downloads");