File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
services-gateway/src/test/java/io/scalecube/services/gateway/files Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 34
34
import java .net .http .HttpResponse ;
35
35
import java .nio .file .Files ;
36
36
import java .nio .file .Path ;
37
+ import java .nio .file .Paths ;
37
38
import java .time .Duration ;
38
39
import org .junit .jupiter .api .AfterAll ;
39
40
import org .junit .jupiter .api .AfterEach ;
@@ -320,10 +321,11 @@ void successfulDownload(long fileSize) throws Exception {
320
321
}
321
322
322
323
private static Path downloadFile (String reportUrl ) throws Exception {
324
+ Path tmpPath = Paths .get (System .getProperty ("java.io.tmpdir" ));
323
325
return HttpClient .newHttpClient ()
324
326
.send (
325
327
HttpRequest .newBuilder ().uri (URI .create (reportUrl )).build (),
326
- HttpResponse .BodyHandlers .ofFileDownload (Path . of ( "target" ) , CREATE , WRITE ))
328
+ HttpResponse .BodyHandlers .ofFileDownload (tmpPath , CREATE , WRITE ))
327
329
.body ();
328
330
}
329
331
You can’t perform that action at this time.
0 commit comments