public class TestProcedureMember extends Object
Modifier and Type | Class and Description |
---|---|
class |
TestProcedureMember.EmptySubprocedure
Helper
Procedure who's phase for each step is just empty |
Constructor and Description |
---|
TestProcedureMember() |
Modifier and Type | Method and Description |
---|---|
void |
resetTest()
Reset all the mock objects
|
void |
testCoordinatorAbort()
Fail correctly if coordinator aborts the procedure.
|
void |
testMemberCommitCommsFailure()
Handle Failures if a member's commit phase succeeds but notification to coordinator fails
NOTE: This is the core difference that makes this different from traditional 2PC.
|
void |
testMemberCommitException()
Handle failures if a member's commit phase fails.
|
void |
testMemberPrepareException()
Make sure we call cleanup etc, when we have an exception during
Subprocedure.acquireBarrier() . |
void |
testNoTaskToBeRunFromRequest()
Test that the cohort member correctly doesn't attempt to start a task when the builder cannot
correctly build a new task for the requested operation
|
void |
testPropagateConnectionErrorBackToManager()
Fail correctly on getting an external error while waiting for the prepared latch
|
void |
testSendMemberAcquiredCommsFailure()
Make sure we call cleanup etc, when we have an exception during prepare.
|
void |
testSimpleRun()
Test the normal sub procedure execution case.
|
public void resetTest()
public void testSimpleRun() throws Exception
Exception
public void testMemberPrepareException() throws Exception
Subprocedure.acquireBarrier()
.Exception
public void testSendMemberAcquiredCommsFailure() throws Exception
Exception
public void testCoordinatorAbort() throws Exception
Subprocedure#prepare
-- prepare needs to finish first, and the the abort
is checked. Thus, the Subprocedure#prepare
should succeed but later get rolled back
via Subprocedure.cleanup(java.lang.Exception)
.Exception
public void testMemberCommitException() throws Exception
Exception
public void testMemberCommitCommsFailure() throws Exception
Exception
public void testPropagateConnectionErrorBackToManager() throws Exception
Exception
- on failure