You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by ho...@apache.org on 2008/06/17 19:56:20 UTC
svn commit: r668771 -
/lucene/solr/trunk/src/test/org/apache/solr/servlet/CacheHeaderTest.java
Author: hossman
Date: Tue Jun 17 10:56:20 2008
New Revision: 668771
URL: http://svn.apache.org/viewvc?rev=668771&view=rev
Log:
tmp files for tests should be temporary ... and not created in the current working directory
Modified:
lucene/solr/trunk/src/test/org/apache/solr/servlet/CacheHeaderTest.java
Modified: lucene/solr/trunk/src/test/org/apache/solr/servlet/CacheHeaderTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/servlet/CacheHeaderTest.java?rev=668771&r1=668770&r2=668771&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/servlet/CacheHeaderTest.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/servlet/CacheHeaderTest.java Tue Jun 17 10:56:20 2008
@@ -36,8 +36,6 @@
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 @@
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);