Skip to content

Commit b59c91e

Browse files
committed
Fixed failures in download tests
1 parent efdd341 commit b59c91e

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

‎app/test/cc/arduino/contributions/GzippedJsonDownloaderTest.java

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import org.junit.After;
99
import org.junit.Before;
1010
import org.junit.Test;
11+
12+
import processing.app.BaseNoGui;
1113
import processing.app.helpers.FileUtils;
1214

1315
import java.io.File;
@@ -38,6 +40,7 @@ public void tearDown() throws Exception {
3840

3941
@Test
4042
public void testJsonDownload() throws Exception {
43+
BaseNoGui.initPlatform();
4144
new GZippedJsonDownloader(downloader, new URL("http://downloads.arduino.cc/libraries/library_index.json"),
4245
new URL("http://downloads.arduino.cc/libraries/library_index.json.gz"))
4346
.download(tempFile, new MultiStepProgress(1), "", new NoopProgressListener(), true);

‎app/test/cc/arduino/contributions/JsonDownloaderTest.java

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import org.junit.After;
99
import org.junit.Before;
1010
import org.junit.Test;
11+
12+
import processing.app.BaseNoGui;
1113
import processing.app.helpers.FileUtils;
1214

1315
import java.io.File;
@@ -38,6 +40,7 @@ public void tearDown() throws Exception {
3840

3941
@Test
4042
public void testJsonDownload() throws Exception {
43+
BaseNoGui.initPlatform();
4144
new JsonDownloader(downloader, new URL("http://downloads.arduino.cc/libraries/library_index.json"))
4245
.download(tempFile, new MultiStepProgress(1), "", new NoopProgressListener(), true);
4346

‎arduino-core/src/processing/app/BaseNoGui.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ static public void initPackages() throws Exception {
509509
}
510510
}
511511

512-
static protected void initPlatform() {
512+
static public void initPlatform() {
513513
try {
514514
Class<?> platformClass = Class.forName("processing.app.Platform");
515515
if (OSUtils.isMacOS()) {

0 commit comments

Comments
 (0)