Compare commits

..

No commits in common. "df667743381490bc16a2d6f3171d61cbac37f300" and "42bd25dd1cda115d0ab4f0709818e694960dc595" have entirely different histories.

2 changed files with 3 additions and 29 deletions

2
core

@ -1 +1 @@
Subproject commit daa5a12437feaa4e3d69dea1385a44f7eaeccf0a
Subproject commit 51b3fa3cb6f6cef2e705ee805f704c11c45e7c41

View file

@ -20,8 +20,6 @@ import rife.tools.FileUtils;
import rife.tools.exceptions.FileUtilsErrorException;
import java.io.File;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
@ -39,33 +37,9 @@ public class TestPublishOperation {
throws Exception {
reposiliteJar_ = File.createTempFile("reposilite", "jar");
reposiliteJar_.deleteOnExit();
var url = "https://maven.reposilite.com/releases/com/reposilite/reposilite/3.4.0/reposilite-3.4.0-all.jar";
System.out.print("Downloading: " + url + " ...");
System.out.print("Downloading: https://maven.reposilite.com/releases/com/reposilite/reposilite/3.4.0/reposilite-3.4.0-all.jar ...");
System.out.flush();
// the reposilite CDN intermittently rate-limits with a 403 when
// several matrix jobs download at the same time, retry with a
// backoff before giving up
var attempts = 5;
for (var attempt = 1; ; ++attempt) {
try {
var connection = (HttpURLConnection) new URL(url).openConnection();
connection.setRequestProperty("User-Agent", "bld-tests");
connection.setConnectTimeout(30_000);
connection.setReadTimeout(60_000);
try (var input = connection.getInputStream()) {
FileUtils.copy(input, reposiliteJar_);
}
break;
} catch (IOException e) {
if (attempt >= attempts) {
throw e;
}
System.out.print(" retrying (" + e.getMessage() + ") ...");
System.out.flush();
Thread.sleep(attempt * 3_000L);
}
}
FileUtils.copy(new URL("https://maven.reposilite.com/releases/com/reposilite/reposilite/3.4.0/reposilite-3.4.0-all.jar").openStream(), reposiliteJar_);
System.out.println("done");
}