Use java.io.tmpdir instead of hardcoded /tmp

This commit is contained in:
Wido den Hollander 2015-09-24 15:07:41 +02:00
parent 13b29bac5a
commit 9e90b5393a

View File

@ -31,7 +31,7 @@ public class LocalTemplateDownloaderTest {
@Test @Test
public void localTemplateDownloaderTest() { public void localTemplateDownloaderTest() {
String url = "file://" + new File("pom.xml").getAbsolutePath(); String url = "file://" + new File("pom.xml").getAbsolutePath();
TemplateDownloader td = new LocalTemplateDownloader(null, url, "/tmp", TemplateDownloader.DEFAULT_MAX_TEMPLATE_SIZE_IN_BYTES, null); TemplateDownloader td = new LocalTemplateDownloader(null, url, System.getProperty("java.io.tmpdir"), TemplateDownloader.DEFAULT_MAX_TEMPLATE_SIZE_IN_BYTES, null);
long bytes = td.download(true, null); long bytes = td.download(true, null);
if (!(bytes > 0)) { if (!(bytes > 0)) {
fail("Failed download"); fail("Failed download");