Hi Lewis,
Please don't go mad. we need you : )
Did you tried putting the test conf under gora-cassandra/src/test/conf/ ?
See the files in gora-hbase/src/test/conf/.
The classpath and test classpath is cofigured in build-common.xml:
<path id="classpath">
<pathelement location="${build.classes.dir}"/>
<pathelement location="${conf.dir}"/>
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<!-- the unit test classpath: uses test.src.dir for configuration -->
<path id="test.classpath">
<pathelement location="${examples.build.classes.dir}"/>
<pathelement location="${conf.dir}"/>
<pathelement location="${test.build.classes.dir}" />
<pathelement location="${test.src.dir}"/>
<pathelement location="${build.dir}"/>
<pathelement location="${test.conf.dir}"/>
<path refid="classpath"/>
</path>
Enis
On Fri, Mar 9, 2012 at 5:33 PM, Lewis John Mcgibbney <
[email protected]> wrote:
> Hi,
>
> I'm back looking at the Cassandra tests again and I've nearly cracked them.
>
> What I don't understand is how to obtain the mapping's from
> conf/gora-cassandra-mapping.xml?
>
> What I have so far is
>
> lewis@lewis-01:~/ASF/gora/gora-cassandra/src/test$ tree
> .
> ├── conf
> │ ├── cassandra.yaml
> │ ├── gora-cassandra-mapping.xml
> │ ├── gora.properties
> └── java
> └── org
> └── apache
> └── gora
> └── cassandra
> ├── GoraCassandraTestDriver.java
> └── store
> └── TestCassandraStore.java
>
>
> Looking at the TestHbaseStore I see that we call
>
> @Override
> public void setUp() throws Exception {
> super.setUp();
> conf = getTestDriver().getHbaseUtil().getConfiguration();
> }
>
> Is this what is required to obtain the mapping configuration? This is easy
> using HBaseTestingUtility as it's a method in the class, unfortunately
> neither CassandraDaemon (Cassandra API) nor EmbeddedServerHelper (Hector
> API) have this method to simply call on...
>
> When I try to run my tests my Cassandra configuration is fine, but no
> mapping seems to be retrieved and most of the test log output complains
>
> testTruncateSchema(org.apache.gora.cassandra.store.TestCassandraStore):
> org.apache.avro.generic.GenericArray.add(Ljava/lang/Object;)V
> testTruncateSchema(org.apache.gora.cassandra.store.TestCassandraStore):
> InvalidRequestException(why:Keyspace does not exist.)
>
> This is because I'm not picking up the mappings from conf. I've uploaded my
> latest patch to Jira @ GORA-53-v8.patch ha ha ha!!! I would seriously
> appreciate if someone could shine some light on it for me/put me out my
> misery/stop me from going insane in the membrane... etc.
>
> This is driving me mad.
>
> Thanks
>
> Lewis
>