lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r819441 - /lucene/solr/trunk/src/test/org/apache/solr/schema/TestBinaryField.java
Date Mon, 28 Sep 2009 01:22:53 GMT
Author: yonik
Date: Mon Sep 28 01:22:53 2009
New Revision: 819441

URL: http://svn.apache.org/viewvc?rev=819441&view=rev
Log:
tests: make TestBinaryField use generic tmp dir so it's cleaned up at the end

Modified:
    lucene/solr/trunk/src/test/org/apache/solr/schema/TestBinaryField.java

Modified: lucene/solr/trunk/src/test/org/apache/solr/schema/TestBinaryField.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/schema/TestBinaryField.java?rev=819441&r1=819440&r2=819441&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/schema/TestBinaryField.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/schema/TestBinaryField.java Mon Sep 28 01:22:53
2009
@@ -25,13 +25,14 @@
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.SolrInputDocument;
+import org.apache.solr.util.AbstractSolrTestCase;
 import org.apache.commons.io.FileUtils;
 
 import java.nio.ByteBuffer;
 import java.io.File;
 import java.util.List;
 
-public class TestBinaryField extends TestCase {
+public class TestBinaryField extends AbstractSolrTestCase {
   CommonsHttpSolrServer server;
   JettySolrRunner jetty;
 
@@ -39,14 +40,18 @@
   static final String context = "/example";
 
 
+  public String getSchemaFile() {
+    return null;
+  }
+  public String getSolrConfigFile() {
+    return null;
+  }
+
   @Override
   public void setUp() throws Exception {
     super.setUp();
 
-    String home = System.getProperty("java.io.tmpdir")
-            + File.separator
-            + getClass().getName() + "-" + System.currentTimeMillis();
-
+    File home = dataDir;
 
     File homeDir = new File(home, "example");
     File dataDir = new File(homeDir, "data");
@@ -76,6 +81,7 @@
     String url = "http://localhost:" + jetty.getLocalPort() + context;
     server = new CommonsHttpSolrServer(url);
 //    server.setRequestWriter(new BinaryRequestWriter());
+    super.postSetUp();
   }
 
   public void testSimple() throws Exception {
@@ -172,7 +178,8 @@
   }
 
 
-  protected void tearDown() throws Exception {
+  public void tearDown() throws Exception {
     jetty.stop();
+    super.tearDown();
   }
 }



Mime
View raw message