Merge pull request #884 from wido/test-tmp-dir

Use java.io.tmpdir instead of hardcoded /tmpSmall fix to have the tests also work on other platforms

* pr/884:
  Use java.io.tmpdir instead of hardcoded /tmp

Signed-off-by: Wido den Hollander <wido@widodh.nl>
This commit is contained in:
Wido den Hollander 2015-09-25 10:13:03 +02:00
commit 6841ba61da

View File

@ -31,7 +31,7 @@ public class LocalTemplateDownloaderTest {
@Test
public void localTemplateDownloaderTest() {
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);
if (!(bytes > 0)) {
fail("Failed download");