- Assert.assertTrue(preCommitDone);
-
- // FIXME : When we commit on the cohort it "kills" the Transaction.
- // This in turn kills the child of Transaction as well.
- // The order in which we receive the terminated event for both
- // these actors is not fixed which may cause this test to fail
- cohort.tell(new CommitTransaction(), getRef());
-
- final Boolean terminatedCohort =
- new ExpectMsg<Boolean>("Terminated Cohort") {
- protected Boolean match(Object in) {
- if (in instanceof Terminated) {
- return cohorActorRef.equals(((Terminated) in).actor());
- } else {
- throw noMatch();
- }
- }
- }.get(); // this extracts the received message
-
- Assert.assertTrue(terminatedCohort);
-
-
- final Boolean terminatedTransaction =
- new ExpectMsg<Boolean>("Terminated Transaction") {
- protected Boolean match(Object in) {
- if (in instanceof Terminated) {
- return transactionActorRef.equals(((Terminated) in).actor());
- } else {
- throw noMatch();
- }
- }
- }.get(); // this extracts the received message