You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by da...@apache.org on 2009/04/29 02:14:22 UTC

svn commit: r769596 - in /db/derby/code/trunk/java: engine/org/apache/derby/loc/ shared/org/apache/derby/shared/common/reference/ testing/org/apache/derbyTesting/functionTests/tests/lang/ testing/org/apache/derbyTesting/functionTests/tests/replicationT...

Author: dag
Date: Wed Apr 29 00:14:20 2009
New Revision: 769596

URL: http://svn.apache.org/viewvc?rev=769596&view=rev
Log:
DERBY-3417 slave side stop in a client server mode results in SQLState printed without proper error message

Patch derby-3417-2.

A set of replication errors have been made session level (they are),
also having the effect of preformatting the error message strings on
the server, solving this issue. Also removed usage of
org.apache.derby.shared.common.reference.SQLState's strings in the
replication tests to make them self contained.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
    db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1_1.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1_2.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml?rev=769596&r1=769595&r2=769596&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/loc/messages.xml Wed Apr 29 00:14:20 2009
@@ -4901,7 +4901,7 @@
             </msg>
 
             <msg>
-                <name>XRE04.U.1</name>
+                <name>XRE04.C.1</name>
                 <text>Could not establish a connection to the peer of the replicated database '{0}' on address '{1}:{2}'.</text>
                 <arg>dbname</arg>
                 <arg>hostname</arg>
@@ -4909,13 +4909,13 @@
             </msg>
 
             <msg>
-                <name>XRE04.U.2</name>
+                <name>XRE04.C.2</name>
                 <text>Connection lost for replicated database '{0}'.</text>
                 <arg>dbname</arg>
             </msg>
 
             <msg>
-                <name>XRE05</name>
+                <name>XRE05.C</name>
                 <text>The log files on the master and slave are not in synch for replicated database '{0}'. The master log instant is {1}:{2}, whereas the slave log instant is {3}:{4}. This is FATAL for replication - replication will be stopped.</text>
                 <arg>dbname</arg>
                 <arg>masterfile</arg>
@@ -4942,8 +4942,8 @@
             </msg>
 
             <msg>
-                <name>XRE09</name>
-                <text>Cannot start replication slave mode for database '{0}'. The database has already been booted. </text>
+                <name>XRE09.C</name>
+                <text>Cannot start replication slave mode for database '{0}'. The database has already been booted.</text>
                 <arg>dbname</arg>
             </msg>
 
@@ -4954,7 +4954,7 @@
             </msg>
             
             <msg>
-                <name>XRE11</name>
+                <name>XRE11.C</name>
                 <text>Could not perform operation '{0}' because the database '{1}' has not been booted.</text>
                 <arg>command</arg>
                 <arg>dbname</arg>
@@ -4975,13 +4975,13 @@
             </msg>
             
             <msg>
-                <name>XRE21</name>
+                <name>XRE21.C</name>
                 <text>Error occurred while performing failover for database '{0}', Failover attempt was aborted.</text>
                 <arg>dbname</arg>
             </msg>
 
             <msg>
-                <name>XRE22</name>
+                <name>XRE22.C</name>
                 <text>Replication master has already been booted for database '{0}'</text>
                 <arg>dbname</arg>
             </msg>
@@ -4997,12 +4997,12 @@
             </msg>
 
             <msg>
-                <name>XRE41</name>
+                <name>XRE41.C</name>
                 <text>Replication operation 'failover' or 'stopSlave' refused on the slave database because the connection with the master is working. Issue the 'failover' or 'stopMaster' operation on the master database instead.</text>
             </msg>
 
             <msg>
-                <name>XRE42</name>
+                <name>XRE42.C</name>
                 <text>Replicated database '{0}' shutdown.</text>
                 <arg>dbname</arg>
             </msg>

Modified: db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java?rev=769596&r1=769595&r2=769596&view=diff
==============================================================================
--- db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java (original)
+++ db/derby/code/trunk/java/shared/org/apache/derby/shared/common/reference/SQLState.java Wed Apr 29 00:14:20 2009
@@ -1799,23 +1799,23 @@
     String REPLICATION_LOG_CORRUPTED                               = "XRE01";
     String REPLICATION_MASTER_SLAVE_VERSION_MISMATCH               = "XRE02";
     String REPLICATION_UNEXPECTED_EXCEPTION                        = "XRE03";
-    String REPLICATION_CONNECTION_EXCEPTION                        = "XRE04.U.1";
-    String REPLICATION_CONNECTION_LOST                             = "XRE04.U.2";
-    String REPLICATION_LOG_OUT_OF_SYNCH                            = "XRE05";
+    String REPLICATION_CONNECTION_EXCEPTION                        = "XRE04.C.1";
+    String REPLICATION_CONNECTION_LOST                             = "XRE04.C.2";
+    String REPLICATION_LOG_OUT_OF_SYNCH                            = "XRE05.C";
     String REPLICATION_MASTER_TIMED_OUT                            = "XRE06";
     String REPLICATION_NOT_IN_MASTER_MODE                          = "XRE07";
     String REPLICATION_SLAVE_STARTED_OK                            = "XRE08";
-    String CANNOT_START_SLAVE_ALREADY_BOOTED                       = "XRE09";
+    String CANNOT_START_SLAVE_ALREADY_BOOTED                       = "XRE09.C";
     String REPLICATION_CONFLICTING_ATTRIBUTES                      = "XRE10";
-    String REPLICATION_DB_NOT_BOOTED                               = "XRE11";
+    String REPLICATION_DB_NOT_BOOTED                               = "XRE11.C";
     String REPLICATION_UNEXPECTED_MESSAGEID                        = "XRE12";
     String REPLICATION_FAILOVER_SUCCESSFUL                         = "XRE20.D";
-    String REPLICATION_FAILOVER_UNSUCCESSFUL                       = "XRE21";
-    String REPLICATION_MASTER_ALREADY_BOOTED                       = "XRE22";
+    String REPLICATION_FAILOVER_UNSUCCESSFUL                       = "XRE21.C";
+    String REPLICATION_MASTER_ALREADY_BOOTED                       = "XRE22.C";
     String REPLICATION_UNLOGGED_OPERATIONS_IN_PROGRESS             = "XRE23";
     String REPLICATION_NOT_IN_SLAVE_MODE                           = "XRE40";
-    String SLAVE_OPERATION_DENIED_WHILE_CONNECTED                  = "XRE41";
-    String REPLICATION_SLAVE_SHUTDOWN_OK                           = "XRE42";
+    String SLAVE_OPERATION_DENIED_WHILE_CONNECTED                  = "XRE41.C";
+    String REPLICATION_SLAVE_SHUTDOWN_OK                           = "XRE42.C";
     String REPLICATION_STOPSLAVE_NOT_INITIATED                     = "XRE43";
 }
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java?rev=769596&r1=769595&r2=769596&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ErrorCodeTest.java Wed Apr 29 00:14:20 2009
@@ -245,9 +245,16 @@
         		{"XSTB3","Cannot abort transaction because the log manager is null, probably due to an earlier error.","50000"},
         		{"XSTB5","Creating database with logging disabled encountered unexpected problem.","50000"},
         		{"XSTB6","Cannot substitute a transaction table with another while one is already in use.","50000"},
-        		{"XXXXX","Normal database session close.","40000"}};
-
-        		
+                {"XXXXX","Normal database session close.","40000"},
+                {"XRE04","Could not establish a connection to the peer of the replicated database '{0}' on address '{1}:{2}'.","40000"},
+                {"XRE04","Connection lost for replicated database '{0}'.","40000"},
+                {"XRE05","The log files on the master and slave are not in synch for replicated database '{0}'. The master log instant is {1}:{2}, whereas the slave log instant is {3}:{4}. This is FATAL for replication - replication will be stopped.","40000"},
+                {"XRE09","Cannot start replication slave mode for database '{0}'. The database has already been booted.","40000"},
+                {"XRE11","Could not perform operation '{0}' because the database '{1}' has not been booted.","40000"},
+                {"XRE21","Error occurred while performing failover for database '{0}', Failover attempt was aborted.","40000"},
+                {"XRE22","Replication master has already been booted for database '{0}'","40000"},
+                {"XRE41","Replication operation 'failover' or 'stopSlave' refused on the slave database because the connection with the master is working. Issue the 'failover' or 'stopMaster' operation on the master database instead.","40000"},
+                {"XRE42","Replicated database '{0}' shutdown.","40000"}};
 
         JDBC.assertUnorderedResultSet(rs, expectedRows);
         s.executeUpdate("drop table t");

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java?rev=769596&r1=769595&r2=769596&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java Wed Apr 29 00:14:20 2009
@@ -28,7 +28,6 @@
 import java.sql.*;
 import java.io.*;
 import org.apache.derby.jdbc.ClientDataSource;
-import org.apache.derby.shared.common.reference.SQLState;
 
 import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.BaseTestCase;
@@ -49,6 +48,8 @@
      */
     final static String REPLICATIONTEST_PROPFILE = "replicationtest.properties";
     
+    final static String REPLICATION_MASTER_TIMED_OUT = "XRE06";
+
     static String testUser = null;
     
     static String userDir = null;
@@ -1004,7 +1005,7 @@
                     }
                     else
                     {
-                        if (SQLState.REPLICATION_MASTER_TIMED_OUT.equals(sState)) // FIXME! CANNOT_START_MASTER_ALREADY_BOOTED
+                        if (REPLICATION_MASTER_TIMED_OUT.equals(sState)) // FIXME! CANNOT_START_MASTER_ALREADY_BOOTED
                         {
                             util.DEBUG("Master already started?");
                         }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1.java?rev=769596&r1=769595&r2=769596&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1.java Wed Apr 29 00:14:20 2009
@@ -25,7 +25,7 @@
 import java.sql.SQLException;
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.derby.shared.common.reference.SQLState;
+import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 import org.apache.derbyTesting.junit.SecurityManagerSetup;
 
 
@@ -38,8 +38,16 @@
 
 public class ReplicationRun_Local_StateTest_part1 extends ReplicationRun
 {
-    
-    /**
+    final static String CANNOT_CONNECT_TO_DB_IN_SLAVE_MODE = "08004";
+    final static String LOGIN_FAILED = "08004";
+    final static String REPLICATION_DB_NOT_BOOTED = "XRE11";
+    final static String REPLICATION_MASTER_ALREADY_BOOTED = "XRE22";
+    final static String REPLICATION_NOT_IN_MASTER_MODE = "XRE07";
+    final static String REPLICATION_SLAVE_STARTED_OK = "XRE08";
+
+
+
+/**
      * Creates a new instance of ReplicationRun_Local_StateTest_part1
      * 
      * @param testcaseName Identifying the test.
@@ -262,8 +270,10 @@
             String msg = ec + " " + ss + " " + se.getMessage();
             // SQLState.REPLICATION_NOT_IN_MASTER_MODE
 
-            assertTrue("stopMaster on master failed: " + msg, 
-                    SQLState.REPLICATION_NOT_IN_MASTER_MODE.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                "stopMaster on master failed: " + msg,
+                REPLICATION_NOT_IN_MASTER_MODE,
+                se);
             util.DEBUG("stopMaster on master failed as expected: " + connectionURL + " " + msg);
         }
         
@@ -285,8 +295,10 @@
             int ec = se.getErrorCode();
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
-            assertTrue("stopSlave on slave failed: " + msg, 
-                    SQLState.REPLICATION_DB_NOT_BOOTED.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                "stopSlave on slave failed: " + msg,
+                REPLICATION_DB_NOT_BOOTED,
+                se);
             util.DEBUG("stopSlave on slave failed as expected: " + connectionURL + " " + msg);
         }
     }
@@ -317,8 +329,10 @@
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
             util.DEBUG(msg);
-            assertTrue("2. Unexpected SQLException: " + msg, 
-                    SQLState.REPLICATION_SLAVE_STARTED_OK.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                "2. Unexpected SQLException: " + msg,
+                REPLICATION_SLAVE_STARTED_OK,
+                se);
         }
         
         // Next StartSlave connect should fail:
@@ -334,8 +348,10 @@
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
             util.DEBUG(msg);
-            assertTrue("2. Unexpected SQLException: " + msg, 
-                    SQLState.LOGIN_FAILED.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                "2. Unexpected SQLException: " + msg,
+                LOGIN_FAILED,
+                se);
         }
         
     }
@@ -377,8 +393,10 @@
             String msg = ec + " " + ss + " " + se.getMessage();
             util.DEBUG(msg);
             util.DEBUG("1. startMaster: No connection as expected: " + msg);
-            assertTrue("1. Unexpected SQLException: " + msg, 
-                    SQLState.REPLICATION_CONNECTION_EXCEPTION.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                "1. Unexpected SQLException: " + msg,
+                REPLICATION_CONNECTION_EXCEPTION,
+                se);
         }
         */
         
@@ -399,8 +417,10 @@
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
             util.DEBUG("2. startMaster No connection as expected: " + msg);
-            assertTrue("2. Unexpected SQLException: " + msg, 
-                    SQLState.REPLICATION_MASTER_ALREADY_BOOTED.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                "2. Unexpected SQLException: " + msg,
+                REPLICATION_MASTER_ALREADY_BOOTED,
+                se);
         }
         }
         
@@ -426,8 +446,10 @@
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
             util.DEBUG("3. startSlave No connection as expected: " + msg);
-            assertTrue("3. Unexpected SQLException: " + msg, 
-                   SQLState.CANNOT_CONNECT_TO_DB_IN_SLAVE_MODE.startsWith(ss));
+            BaseJDBCTestCase.assertSQLState(
+                "3. Unexpected SQLException: " + msg,
+                CANNOT_CONNECT_TO_DB_IN_SLAVE_MODE,
+                se);
         }
     }
     

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1_1.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1_1.java?rev=769596&r1=769595&r2=769596&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1_1.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1_1.java Wed Apr 29 00:14:20 2009
@@ -25,8 +25,8 @@
 import java.sql.SQLException;
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.derby.shared.common.reference.SQLState;
 import org.apache.derbyTesting.junit.SecurityManagerSetup;
+import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 
 
 /**
@@ -38,7 +38,10 @@
 
 public class ReplicationRun_Local_StateTest_part1_1 extends ReplicationRun
 {
-    
+    final static String REPLICATION_DB_NOT_BOOTED              = "XRE11";
+    final static String REPLICATION_NOT_IN_SLAVE_MODE          = "XRE40";
+    final static String SLAVE_OPERATION_DENIED_WHILE_CONNECTED = "XRE41";
+
     /**
      * Creates a new instance of ReplicationRun_Local_StateTest_part1
      * 
@@ -162,8 +165,10 @@
             int ec = se.getErrorCode();
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
-            assertTrue("connectionURL +  failed: " + msg, 
-                    SQLState.SLAVE_OPERATION_DENIED_WHILE_CONNECTED.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                connectionURL + " failed: ",
+                SLAVE_OPERATION_DENIED_WHILE_CONNECTED,
+                se);
             util.DEBUG("1. Failed as expected: " + connectionURL +  " " + msg);
         }
         // Default replication test sequence still OK.
@@ -187,8 +192,10 @@
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
             // SSQLCODE: -1, SQLSTATE: XRE40
-            assertTrue("connectionURL +  failed: " + msg, 
-                    SQLState.REPLICATION_NOT_IN_SLAVE_MODE.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                connectionURL + " failed: ",
+                REPLICATION_NOT_IN_SLAVE_MODE,
+                se);
             util.DEBUG("2. Failed as expected: " + connectionURL +  " " + msg);
         }
         // Default replication test sequence still OK.
@@ -222,9 +229,11 @@
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
             util.DEBUG("3. Got "+msg + " Expected: " + 
-                    SQLState.REPLICATION_DB_NOT_BOOTED);
-            assertTrue(connectionURL + " failed: " + msg, 
-                    SQLState.REPLICATION_DB_NOT_BOOTED.equals(ss));
+                       REPLICATION_DB_NOT_BOOTED);
+            BaseJDBCTestCase.assertSQLState(
+                connectionURL + " failed: ",
+                REPLICATION_DB_NOT_BOOTED, 
+                se);
             util.DEBUG("3. Failed as expected: " + connectionURL +  " " + msg);
             stopSlaveCorrect = true;
         }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1_2.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1_2.java?rev=769596&r1=769595&r2=769596&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1_2.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun_Local_StateTest_part1_2.java Wed Apr 29 00:14:20 2009
@@ -25,8 +25,8 @@
 import java.sql.SQLException;
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.derby.shared.common.reference.SQLState;
 import org.apache.derbyTesting.junit.SecurityManagerSetup;
+import org.apache.derbyTesting.junit.BaseJDBCTestCase;
 
 
 /**
@@ -39,6 +39,11 @@
 public class ReplicationRun_Local_StateTest_part1_2 extends ReplicationRun
 {
     
+    final static String LOGIN_FAILED = "08004";
+    final static String REPLICATION_DB_NOT_BOOTED = "XRE11";
+    final static String REPLICATION_MASTER_ALREADY_BOOTED = "XRE22";
+    final static String REPLICATION_NOT_IN_MASTER_MODE = "XRE07";
+    final static String REPLICATION_SLAVE_STARTED_OK = "XRE08";
     /**
      * Creates a new instance of ReplicationRun_Local_StateTest_part1
      * 
@@ -166,8 +171,10 @@
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
             //  SQLCODE: -1, SQLSTATE: 08004
-            assertTrue("connectionURL +  failed: " + msg, 
-                    SQLState.LOGIN_FAILED.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                "connectionURL +  failed: " + msg,
+                LOGIN_FAILED,
+                se);
             util.DEBUG("stopMaster on slave failed as expected: " 
                     + connectionURL + " " + msg);
         }
@@ -239,9 +246,11 @@
             int ec = se.getErrorCode();
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
-            assertTrue("4. stopMaster on slave failed with: " 
-                    + connectionURL + " " + msg, 
-                    SQLState.REPLICATION_NOT_IN_MASTER_MODE.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                "4. stopMaster on slave failed with: " 
+                    + connectionURL + " " + msg,
+                REPLICATION_NOT_IN_MASTER_MODE,
+                se);
             util.DEBUG("4. stopMaster on slave failed as expected: " 
                     + connectionURL + " " + msg);
         }
@@ -287,9 +296,11 @@
             int ec = se.getErrorCode();
             String ss = se.getSQLState();
             String msg = ec + " " + ss + " " + se.getMessage();
-            assertTrue("6. stopMaster on server not in master mode failed with: " 
-                    + connectionURL + " " + msg, 
-                    SQLState.REPLICATION_NOT_IN_MASTER_MODE.equals(ss));
+            BaseJDBCTestCase.assertSQLState(
+                "6. stopMaster on server not in master mode failed with: " 
+                    + connectionURL + " " + msg,
+                REPLICATION_NOT_IN_MASTER_MODE,
+                se);
             util.DEBUG("6. stopMaster on server not in master mode failed as expected: " 
                     + connectionURL + " " + msg);
         }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java?rev=769596&r1=769595&r2=769596&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationSuite.java Wed Apr 29 00:14:20 2009
@@ -1,6 +1,6 @@
 /*
 
-   Derby - Class org.apache.derbyTesting.functionTests.tests.jdbc4.ReplicationSuite
+   Derby - Class org.apache.derbyTesting.functionTests.tests.replicationTests.ReplicationSuite
 
        Licensed to the Apache Software Foundation (ASF) under one
        or more contributor license agreements.  See the NOTICE file
@@ -30,7 +30,7 @@
 
 /**
  * Suite to run all JUnit tests in this package:
- * org.apache.derbyTesting.functionTests.tests.jdbc4
+ * org.apache.derbyTesting.functionTests.tests.replicationTests
  *
  */
 public class ReplicationSuite extends BaseTestCase