mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-19 08:52:15 +01:00
Fixed failures in download tests
This commit is contained in:
parent
efdd341e0e
commit
b59c91ebe2
@ -8,6 +8,8 @@ import com.fasterxml.jackson.module.mrbean.MrBeanModule;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import processing.app.BaseNoGui;
|
||||
import processing.app.helpers.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
@ -38,6 +40,7 @@ public class GzippedJsonDownloaderTest {
|
||||
|
||||
@Test
|
||||
public void testJsonDownload() throws Exception {
|
||||
BaseNoGui.initPlatform();
|
||||
new GZippedJsonDownloader(downloader, new URL("http://downloads.arduino.cc/libraries/library_index.json"),
|
||||
new URL("http://downloads.arduino.cc/libraries/library_index.json.gz"))
|
||||
.download(tempFile, new MultiStepProgress(1), "", new NoopProgressListener(), true);
|
||||
|
@ -8,6 +8,8 @@ import com.fasterxml.jackson.module.mrbean.MrBeanModule;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import processing.app.BaseNoGui;
|
||||
import processing.app.helpers.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
@ -38,6 +40,7 @@ public class JsonDownloaderTest {
|
||||
|
||||
@Test
|
||||
public void testJsonDownload() throws Exception {
|
||||
BaseNoGui.initPlatform();
|
||||
new JsonDownloader(downloader, new URL("http://downloads.arduino.cc/libraries/library_index.json"))
|
||||
.download(tempFile, new MultiStepProgress(1), "", new NoopProgressListener(), true);
|
||||
|
||||
|
@ -509,7 +509,7 @@ public class BaseNoGui {
|
||||
}
|
||||
}
|
||||
|
||||
static protected void initPlatform() {
|
||||
static public void initPlatform() {
|
||||
try {
|
||||
Class<?> platformClass = Class.forName("processing.app.Platform");
|
||||
if (OSUtils.isMacOS()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user