From a0ed8ce425bbe26b620aefc6da7712a4fa111d73 Mon Sep 17 00:00:00 2001 From: Gabriel Einsdorf Date: Thu, 18 Oct 2018 18:07:02 +0200 Subject: [PATCH] HTTPHandleTest: re-add remote reading test This test got lost in 73fca0d44ca3fe4b2174dd50e4a0e4a35946c0ac --- src/test/java/org/scijava/io/http/HTTPHandleTest.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/test/java/org/scijava/io/http/HTTPHandleTest.java b/src/test/java/org/scijava/io/http/HTTPHandleTest.java index d8fb3e1..21cedc4 100644 --- a/src/test/java/org/scijava/io/http/HTTPHandleTest.java +++ b/src/test/java/org/scijava/io/http/HTTPHandleTest.java @@ -37,6 +37,7 @@ import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; +import java.net.URISyntaxException; import java.nio.file.Files; import java.nio.file.Path; import java.util.Collections; @@ -132,6 +133,15 @@ public void testBasicAuth() throws Exception { } } + @Test(timeout=15_000) + public void testRemoteReading() throws URISyntaxException, IOException { + DataHandle handle = dataHandleService.readBuffer(new HTTPLocation( + "https://github.com/scijava/scijava-io-http/raw/master/src/test/resources/testfile")); + + checkBasicReadMethods(handle, true); + checkEndiannessReading(handle); + } + /** * Creates a server which needs to be accessed with HTTP basic auth *