From 200f1ddd7cab2e2f1136e86e964184f19489748d Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Tue, 17 Jun 2008 17:56:20 +0000 Subject: [PATCH] tmp files for tests should be temporary ... and not created in the current working directory git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@668771 13f79535-47bb-0310-9956-ffa450edef68 --- src/test/org/apache/solr/servlet/CacheHeaderTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/org/apache/solr/servlet/CacheHeaderTest.java b/src/test/org/apache/solr/servlet/CacheHeaderTest.java index c6ca9757146..26d82004c41 100644 --- a/src/test/org/apache/solr/servlet/CacheHeaderTest.java +++ b/src/test/org/apache/solr/servlet/CacheHeaderTest.java @@ -36,8 +36,6 @@ public class CacheHeaderTest extends CacheHeaderTestBase { return "solrconfig.xml"; } - protected static final String FILENAME = "cacheheadertest.csv"; - protected static final String CHARSET = "UTF-8"; protected static final String CONTENTS = "id\n100\n101\n102"; @@ -234,7 +232,8 @@ public class CacheHeaderTest extends CacheHeaderTestBase { protected File makeFile(String contents, String charset) { try { - File f=new File(FILENAME); + File f = File.createTempFile(getClass().getName(),"csv"); + f.deleteOnExit(); Writer out = new OutputStreamWriter(new FileOutputStream(f), charset); out.write(contents);