|
I think DERBY-3632 patch derby-3632_p1.diff.txt might "solve"/bypass the main problem here: that failover is attempted before replication is ready.
The test should however also catch the unexpected exception so that the failure is not hidden: I will upload a patch for this. Catch the unexpected exception so that the failure is not hidden.
Ole Solberg made changes - 06/Jun/08 12:30 PM
V.Narayanan made changes - 08/Jun/08 05:48 PM
1) Can't we just leave the 'else' and the catch(Exception ex) parts since the method is already
throwing an Exception? 2) I am not sure this usage assertTrue(msg, false); is right, I guess the aim is to print msg all the time. Do we need to use assertTrue in this case? Also, I will get 3632 in first and then switch to this issue. Hi Narayanan,
1) I agree. The if/else part could probably be replaced with a call to BaseJDBCTestCase.assertSQLState(), and the "catch (Exception e)" part could probably be removed. 2) I think you're right. assertTrue(msg, false) should be replaced with fail(msg). And if we don't catch the exceptions, as you suggested in (1), we don't need that call at all. You are of course right, on both 1) and 2).
This patch should take care of your suggested simplification. Thanks for catching this! ReplicationSuite ran OK with this patch.
Ole Solberg made changes - 09/Jun/08 10:47 AM
V.Narayanan made changes - 09/Jun/08 11:59 AM
Thank you for the patch Ole! Shall run tests and commit tonight or early tomorrow morning.
I have my hands full now (sorry that I can't commit this immediately)! Also should this change be reflected in the 10.4 branch also? Yes, this should be merged to 10.4 also (derby-3632_p1.diff.txt + derby-3709_p1-v2.diff.txt).
Thanks for handling this Narayanan!
Ole Solberg made changes - 09/Jun/08 12:25 PM
Thank you for the patch Ole
I had two unrelated failures while running these tests Sending java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java Transmitting file data . Committed revision 666006. Will merge it to 10.4 after running tests
Ole Solberg made changes - 11/Jun/08 06:53 AM
merged with 10.4. The tests in my environment were blubbering incoherently as usual :-/
Sending java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/ReplicationRun.java Transmitting file data . Committed revision 666631. Patch has been applied (trunk and merged to 10.4).
Ole Solberg made changes - 18/Jun/08 06:40 AM
Marking as Fix Version 10.4.2 because the fix has been ported to the 10.4 branch.
Rick Hillegas made changes - 04/Aug/08 08:45 PM
Can this issue be marked as resolved now?
Resolving: applied to trunk and 10.4.
Ole Solberg made changes - 05/Aug/08 02:34 PM
Knut Anders Hatlen made changes - 25/Apr/09 05:21 PM
Myrna van Lunteren made changes - 04/May/09 06:22 PM
Dag H. Wanvik made changes - 29/Jun/09 10:40 PM
Dag H. Wanvik made changes - 29/Jun/09 10:43 PM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tests call failover immediately after a start master, this results in failover
being called before replication can be booted completely. I will take a closer
look at this over the weekend, unless someone beats me to it.