Skip to content

Commit a0ed8ce

Browse files
author
Gabriel Einsdorf
committed
HTTPHandleTest: re-add remote reading test
This test got lost in 73fca0d
1 parent bfa7fe8 commit a0ed8ce

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/test/java/org/scijava/io/http/HTTPHandleTest.java‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import java.io.FileOutputStream;
3838
import java.io.FileWriter;
3939
import java.io.IOException;
40+
import java.net.URISyntaxException;
4041
import java.nio.file.Files;
4142
import java.nio.file.Path;
4243
import java.util.Collections;
@@ -132,6 +133,15 @@ public void testBasicAuth() throws Exception {
132133
}
133134
}
134135

136+
@Test(timeout=15_000)
137+
public void testRemoteReading() throws URISyntaxException, IOException {
138+
DataHandle<Location> handle = dataHandleService.readBuffer(new HTTPLocation(
139+
"https://github.com/scijava/scijava-io-http/raw/master/src/test/resources/testfile"));
140+
141+
checkBasicReadMethods(handle, true);
142+
checkEndiannessReading(handle);
143+
}
144+
135145
/**
136146
* Creates a server which needs to be accessed with HTTP basic auth
137147
*

0 commit comments

Comments
 (0)