You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Thiwanka Somasiri <as...@gmail.com> on 2010/04/06 03:54:50 UTC

Failures and error in JUnit test

Hi,
      I got an error and failure when JUnit test is done on command "java
junit.textui.TestRunner org.apache.derbyTesting.functionTests.suites.All".
What is the problem with this and how can I overcome this.Will it be a
problem for me when testing Derby related things.

These are the error and the failure I ave got:

There was 1 error:
1)
testReplication_Local_1_Indexing(org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun_Local_1Indexing)java.sql.SQLException:
DERBY SQL error: SQL
CODE: -1, SQLSTATE: XJ041, SQLERRMC: Failed to create database
'C:\Users\HP\Desktop\GSOC\Code\Testing\suites.All\db_master\wombat', see the
next exception for details.::SQ
LSTATE: XBM0JDirectory
C:\Users\HP\Desktop\GSOC\Code\Testing\suites.All\db_master\C:\Users\HP\Desktop\GSOC\Code\Testing\suites.All\db_master\wombat
already exists.
        at
org.apache.derby.client.am.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:96)
        at
org.apache.derby.client.am.SqlException.getSQLException(SqlException.java:358)
        at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:149)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at java.sql.DriverManager.getConnection(Unknown Source)
        at
org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun.bootMasterDatabase(ReplicationRun.java:863)
        at
org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun.makeReadyForReplication(ReplicationRun.java:2746)
        at
org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun_Local_1Indexing.testReplication_Local_1_Indexing(ReplicationRun_Local_1Indexing.java
:70)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at
org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:109)
        at
org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun.runBare(ReplicationRun.java:207)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
        at junit.extensions.TestSetup.run(TestSetup.java:25)
Caused by: org.apache.derby.client.am.SqlException: DERBY SQL error:
SQLCODE: -1, SQLSTATE: XJ041, SQLERRMC: Failed to create database
'C:\Users\HP\Desktop\GSOC\Code\Testi
ng\suites.All\db_master\wombat', see the next exception for
details.::SQLSTATE: XBM0JDirectory
C:\Users\HP\Desktop\GSOC\Code\Testing\suites.All\db_master\C:\Users\HP\Deskt
op\GSOC\Code\Testing\suites.All\db_master\wombat already exists.
        at
org.apache.derby.client.am.Connection.completeSqlca(Connection.java:2082)
        at
org.apache.derby.client.net.NetConnectionReply.parseRdbAccessFailed(NetConnectionReply.java:540)
        at
org.apache.derby.client.net.NetConnectionReply.parseAccessRdbError(NetConnectionReply.java:433)
        at
org.apache.derby.client.net.NetConnectionReply.parseACCRDBreply(NetConnectionReply.java:297)
        at
org.apache.derby.client.net.NetConnectionReply.readAccessDatabase(NetConnectionReply.java:121)
        at
org.apache.derby.client.net.NetConnection.readSecurityCheckAndAccessRdb(NetConnection.java:834)
        at
org.apache.derby.client.net.NetConnection.flowSecurityCheckAndAccessRdb(NetConnection.java:758)
        at
org.apache.derby.client.net.NetConnection.flowUSRIDONLconnect(NetConnection.java:591)
        at
org.apache.derby.client.net.NetConnection.flowConnect(NetConnection.java:398)
        at
org.apache.derby.client.net.NetConnection.<init>(NetConnection.java:218)
        at
org.apache.derby.client.net.NetConnection40.<init>(NetConnection40.java:77)
        at
org.apache.derby.client.net.ClientJDBCObjectFactoryImpl40.newNetConnection(ClientJDBCObjectFactoryImpl40.java:269)
        at org.apache.derby.jdbc.ClientDriver.connect(ClientDriver.java:140)
        ... 32 more
There was 1 failure:
1) CollationTest:territory=pljunit.framework.AssertionFailedError:
C:\Users\HP\Desktop\GSOC\Code\Testing\suites.All\system\singleUse\oneused
        at
org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:135)
        at
org.apache.derbyTesting.junit.DropDatabaseSetup.access$000(DropDatabaseSetup.java:35)
        at
org.apache.derbyTesting.junit.DropDatabaseSetup$1.run(DropDatabaseSetup.java:105)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:102)
        at
org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:98)
        at
org.apache.derbyTesting.junit.DropDatabaseSetup.removeDatabase(DropDatabaseSetup.java:91)
        at
org.apache.derbyTesting.junit.DropDatabaseSetup.tearDown(DropDatabaseSetup.java:77)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:22)
        at junit.extensions.TestSetup.run(TestSetup.java:25)
        at
org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
        at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
        at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
        at junit.extensions.TestSetup.run(TestSetup.java:25)

FAILURES!!!
Tests run: 10335,  Failures: 1,  Errors: 1

Thiwanka Somasiri,
University of Moratuwa,
Sri Lanka.

Re: Failures and error in JUnit test

Posted by Knut Anders Hatlen <Kn...@Sun.COM>.
On 04/ 6/10 03:54 AM, Thiwanka Somasiri wrote:
> Hi,
>       I got an error and failure when JUnit test is done on command
> "java junit.textui.TestRunner
> org.apache.derbyTesting.functionTests.suites.All".
> What is the problem with this and how can I overcome this.Will it be a
> problem for me when testing Derby related things.
>
> These are the error and the failure I ave got:
>
> There was 1 error:
> 1)
> testReplication_Local_1_Indexing(org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationRun_Local_1Indexing)java.sql.SQLException:
> DERBY SQL error: SQL
> CODE: -1, SQLSTATE: XJ041, SQLERRMC: Failed to create database
> 'C:\Users\HP\Desktop\GSOC\Code\Testing\suites.All\db_master\wombat',
> see the next exception for details.::SQ
> LSTATE: XBM0JDirectory
> C:\Users\HP\Desktop\GSOC\Code\Testing\suites.All\db_master\C:\Users\HP\Desktop\GSOC\Code\Testing\suites.All\db_master\wombat
> already exists.
>

Hi Thiwanka,

The replication tests sometimes fail in the nightly regression tests as
well, so unless you've made any changes in the replication area, I think
you can just ignore this failure when you're running the tests.

I haven't seen this particular failure before, though, so if it happens
again you may want to file a JIRA issue for it. It looks like this
failure happened because one of the previous tests failed to clean up
after itself, and left a database directory that prevented the next test
from creating the master db.

-- 
Knut Anders