Thanks for the reply... I was able to make appropriate changes to all
appropriate junit classes.. Now as a part of testing when i tried
running suites.all, it seems to have following issues
1) After running for an hour the test automatically seems to have
interrupted at this point as per the log
testUnimplementedSQLObjectAttributes used 142 ms .
testGetSchemasReadOnly used 7 ms .
testGetSchemasModify used 629 ms .
testGetTablesReadOnly used 1528 ms .
testGetTablesModify
2) I got the following exceptions in the log outpout
Caused by: java.sql.SQLException: Database at
C:\java\Derby\source\trunk\system\wombat is at version 10.6 beta. Beta
databases cannot be upgraded,
at
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:45)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory40.java:119)
at
org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(SQLExceptionFactory40.java:73)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:256)
at
org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnection.java:2723)
... 28 more
Caused by: ERROR XSLAP: Database at
C:\java\Derby\source\trunk\system\wombat is at version 10.6 beta. Beta
databases cannot be upgraded,
at java.lang.Throwable.<init>(Throwable.java:67)
On Wed, Jan 5, 2011 at 5:32 AM, Knut Anders Hatlen
<[email protected]> wrote:
> Jayaram Subramanian <[email protected]> writes:
>
>> Hi All,
>> I was analyzing the impact of removing the JDBCClient.isDB2Client()
>> and BaseJDBCTestCase.usingDB2Client() from JUnit test cases. Following
>> are some of the samples of usingDB2Client() references in the
>> souce.... Could you please guide me on how to approach these scenarios
>
> Hi Jayaram,
>
> Here are my suggestions for how to handle these cases:
>
>> functionTests/tests/derbyNet/NSSecurityMechanismTest.java
>> ==========================================================
>> private HashMap addRequiredAttributes(HashMap attrs)
>> {
>> String hostName = TestConfiguration.getCurrent().getHostName();
>> int port = TestConfiguration.getCurrent().getPort();
>> if (usingDB2Client())
>> {
>> //attrs.put("retrieveMessagesFromServerOnGetMessage","true");
>> attrs.put("driverType","4");
>> /**
>> * As per the fix of derby-410 servername should
>> * default to localhost, but for jcc it's still needed
>> */
>> attrs.put("serverName",hostName);
>> }
>
> Remove the entire if statement. This test doesn't run against the DB2
> client anymore, so it should be safe to remove that code.
>
>> functionTEsts/tests/jdbcapi/BlobClob4BlobTest.java
>> ============================================================
>> private void checkException(String SQLState, SQLException se)
>> throws Exception
>> {
>> if (!usingDB2Client()) {
>> assertSQLState(SQLState, se);
>> }
>> }
>
> Here I think we should remove the checkException() method altogether and
> change the callers to use assertSQLState() directly.
>
>> jdbcapi/ConcurrencyTests.java
>> ===============================================================
>> if (!usingDB2Client()) { // DB2 client does not support UR with Derby
>> suite.addTest(new ConcurrencyTest
>> ("testUpdatePurgedTuple2"));
>> suite.addTest(new ConcurrencyTest("testUpdatePurgedTuple3"));
>> suite.addTest(new ConcurrencyTest("testUpdatePurgedTuple4"));
>
> Always add these test cases without checking usingDB2Client() now that
> we don't run this test against the DB2 client anymore.
>
>> jdbcapi/DriverTest.java
>> ============================================================
>> if (usingDerbyNetClient())
>> protocol = protocol +
>> TestConfiguration.getCurrent().getHostName()
>> + ":" + TestConfiguration.getCurrent().getPort() + "/";
>> else if (usingDB2Client())
>> protocol = protocol + "net:" +
>> TestConfiguration.getCurrent().getHostName() + ":" +
>
> Remove the entire else if branch.
>
>> tests/lang/TableFunctionTest.java
>> ==============================================================
>> if (usingDerbyNetClient())
>> protocol = protocol +
>> TestConfiguration.getCurrent().getHostName()
>> + ":" + TestConfiguration.getCurrent().getPort() + "/";
>> else if (usingDB2Client())
>> protocol = protocol + "net:" +
>> TestConfiguration.getCurrent().getHostName() + ":" +
>
> Same here. Remove the entire else if branch.
>
> Hope this helps,
>
> --
> Knut Anders
>