db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gokul Soundararajan <gokul.soun...@gmail.com>
Subject Re: Running Tests
Date Sun, 02 Jul 2006 16:54:23 GMT
Hi Andrew,

Thanks for your help.

> The testing readme is in java/testing/README.htm.

I'm using this document as a guide.

> If you post the errors you are receiving at compile time and run time,
> I can help you track the problem down further.

I'm running ant inside java/testing/. I get 2 sets of compile time errors:

1. 1st set related to BaseJDBCTestCase with method assertTrue()
2. 2nd set related to BaseJDBCTestCase.java/ScrollResultSetTest.java with
methods assertEquals(), assertTrue(), and assertFalse()

These errors seem related. Also, I get the same errors if I build from
${derby.home} by running "ant testing". Please see below for the error printouts.

To run the tests, I wrote a script which runs sysinfo first and then the
cacheService unit test. It doesn't run any tests. I get the error message:
 Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/derbyTesting/unitTests/harness/UnitTestMain

For more details and error messages, please see below.

Thanks,

Gokul

====================================
TESTING SCRIPT
====================================

#!/bin/bash
DERBY_HOME=/home/gokul/code/soc/derby/
DERBY_TESTING=/home/gokul/code/soc/derby/java/testing/

echo "Running system diagnostics"
java -cp
$DERBY_HOME/jars/sane/derbyTesting.jar:
$DERBY_HOME/jars/sane/derby.jar:
$DERBY_HOME/jars/sane/derbytools.jar:
$DERBY_HOME/jars/sane/derbynet.jar:
$DERBY_HOME/jars/sane/derbyclient.jar:
$DERBY_HOME/tools/java/junit.jar:
$DERBY_HOME/tools/java/jakarta-oro-2.0.8.jar
 -Dframework=DerbyNetClient org.apache.derby.tools.sysinfo

java -cp
$DERBY_HOME/jars/sane/derbyTesting.jar:
$DERBY_HOME/jars/sane/derby.jar:
$DERBY_HOME/jars/sane/derbytools.jar:
$DERBY_HOME/jars/sane/derbynet.jar:
$DERBY_HOME/jars/sane/derbyclient.jar:
$DERBY_HOME/jars/sane/derbyrun.jar:
$DERBY_HOME/tools/java/junit.jar:
$DERBY_HOME/tools/java/jakarta-oro-2.0.8.jar  
-Dframework=embedded
org.apache.derbyTesting.functionTests.harness.RunTest unit/cacheService.unit

echo "Done"

==========================================
COMPILE TIME ERRORS - a sample
==========================================

    [javac]
/home/gokul/code/soc/trunk/java/testing/org/apache/derbyTesting/
functionTests/util/BaseJDBCTestCase.java:143:
cannot resolve 
symbol
    [javac] symbol  : method assertTrue (java.lang.String,boolean)
    [javac] location: class
org.apache.derbyTesting.functionTests.util.BaseJDBCTestCase
    [javac]             assertTrue("The expected SQL state must be five
characters long",
    [javac]             ^
    [javac]
/home/gokul/code/soc/trunk/java/testing/org/apache/derbyTesting/
functionTests/util/BaseJDBCTestCase.java:146:
cannot resolve 
symbol
    [javac] symbol  : method assertEquals
(java.lang.String,java.lang.String,java.lang.String)
    [javac] location: class
org.apache.derbyTesting.functionTests.util.BaseJDBCTestCase
    [javac]         assertEquals(message, expected, state);
    [javac]         ^
    [javac] Compile failed; see the compiler error output for details.
    [javac] 4 errors

============================================
RUN TIME ERRORS
============================================

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/derby/tools/sysinfo
Framework: embedded
*** Start: cacheService jdk1.4.2_11 2006-07-02 12:48:59 ***
1 del
< -- Unit Test T_CacheService starting
2 del
< -- Unit Test T_CacheService finished
2 add
> Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/derbyTesting/unitTests/harness/UnitTestMain
Test Failed.
*** End:   cacheService jdk1.4.2_11 2006-07-02 12:49:00 ***






Mime
View raw message