cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eev...@apache.org
Subject svn commit: r892347 - in /incubator/cassandra/branches/cassandra-0.5: build.xml pom.xml src/java/org/apache/cassandra/cli/CliClient.java test/unit/org/apache/cassandra/tools/SSTableImportTest.java
Date Fri, 18 Dec 2009 18:58:25 GMT
Author: eevans
Date: Fri Dec 18 18:58:24 2009
New Revision: 892347

URL: http://svn.apache.org/viewvc?rev=892347&view=rev
Log:
install json test resources from pom.xml too

Patch by Nate McCall; reviewed by eevans for CASSANDRA-636

Modified:
    incubator/cassandra/branches/cassandra-0.5/build.xml
    incubator/cassandra/branches/cassandra-0.5/pom.xml
    incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/cli/CliClient.java
    incubator/cassandra/branches/cassandra-0.5/test/unit/org/apache/cassandra/tools/SSTableImportTest.java

Modified: incubator/cassandra/branches/cassandra-0.5/build.xml
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/build.xml?rev=892347&r1=892346&r2=892347&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/build.xml (original)
+++ incubator/cassandra/branches/cassandra-0.5/build.xml Fri Dec 18 18:58:24 2009
@@ -32,6 +32,7 @@
     <property name="interface.dir" value="${basedir}/interface"/>
     <property name="interface.src.dir" value="${interface.dir}/gen-java"/>
     <property name="test.dir" value="${basedir}/test"/>
+    <property name="test.resources" value="${test.dir}/resources"/>
     <property name="test.classes" value="${build.dir}/test/classes"/>
     <property name="test.conf" value="${test.dir}/conf"/>
     <property name="test.name" value="*Test"/>
@@ -215,10 +216,9 @@
       <src path="${test.unit.src}"/>
     </javac>
 
-    <!-- Non-java resources needed by the test suite -->
-    <mkdir dir="${test.classes}/resources" />
-    <copy todir="${test.classes}/resources">
-      <fileset dir="${test.dir}/resources"/>
+    <!-- Non-java resources needed by the test suite -->    
+    <copy todir="${test.classes}">
+      <fileset dir="${test.resources}"/>
     </copy>
   </target>
 

Modified: incubator/cassandra/branches/cassandra-0.5/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/pom.xml?rev=892347&r1=892346&r2=892347&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/pom.xml (original)
+++ incubator/cassandra/branches/cassandra-0.5/pom.xml Fri Dec 18 18:58:24 2009
@@ -226,6 +226,12 @@
           <include>**/*</include>
         </includes>
       </testResource>
+      <testResource>
+        <directory>${basedir}/test/resources</directory>
+        <includes>
+          <include>*.json</include>
+        </includes>
+      </testResource>
     </testResources>
 
     <plugins>

Modified: incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/cli/CliClient.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/cli/CliClient.java?rev=892347&r1=892346&r2=892347&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/cli/CliClient.java
(original)
+++ incubator/cassandra/branches/cassandra-0.5/src/java/org/apache/cassandra/cli/CliClient.java
Fri Dec 18 18:58:24 2009
@@ -26,7 +26,6 @@
 import java.io.UnsupportedEncodingException;
 
 import org.apache.commons.lang.ArrayUtils;
-import org.hamcrest.core.IsSame;
 
 // Cli Client Side Library
 public class CliClient 

Modified: incubator/cassandra/branches/cassandra-0.5/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/branches/cassandra-0.5/test/unit/org/apache/cassandra/tools/SSTableImportTest.java?rev=892347&r1=892346&r2=892347&view=diff
==============================================================================
--- incubator/cassandra/branches/cassandra-0.5/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
(original)
+++ incubator/cassandra/branches/cassandra-0.5/test/unit/org/apache/cassandra/tools/SSTableImportTest.java
Fri Dec 18 18:58:24 2009
@@ -39,7 +39,7 @@
     public void testImportSimpleCf() throws IOException, ParseException
     {
         // Import JSON to temp SSTable file
-        String jsonUrl = getClass().getClassLoader().getResource("resources/SimpleCF.json").getPath();
+        String jsonUrl = getClass().getClassLoader().getResource("SimpleCF.json").getPath();
         File tempSS = createTemporarySSTable("Keyspace1", "Standard1");
         SSTableImport.importJson(jsonUrl, "Keyspace1", "Standard1", tempSS.getPath());
 
@@ -53,7 +53,7 @@
     @Test
     public void testImportSuperCf() throws IOException, ParseException
     {
-        String jsonUrl = getClass().getClassLoader().getResource("resources/SuperCF.json").getPath();
+        String jsonUrl = getClass().getClassLoader().getResource("SuperCF.json").getPath();
         File tempSS = createTemporarySSTable("Keyspace1", "Super4");
         SSTableImport.importJson(jsonUrl, "Keyspace1", "Super4", tempSS.getPath());
         



Mime
View raw message