3939import com .arjuna .ats .arjuna .coordinator .RecordType ;
4040import com .arjuna .ats .arjuna .coordinator .abstractrecord .RecordTypeManager ;
4141import com .arjuna .ats .arjuna .coordinator .abstractrecord .RecordTypeMap ;
42+ import com .arjuna .ats .arjuna .recovery .RecoveryDriver ;
43+ import com .arjuna .ats .arjuna .recovery .RecoveryManager ;
4244import com .arjuna .ats .arjuna .tools .osb .mbean .ActionBean ;
4345import com .arjuna .ats .arjuna .tools .osb .mbean .LogRecordWrapper ;
4446import com .arjuna .ats .arjuna .tools .osb .mbean .OSEntryBean ;
5052import com .arjuna .ats .internal .arjuna .recovery .RecoveryManagerImple ;
5153import com .hp .mwtests .ts .arjuna .resources .CrashRecord ;
5254
53- import java .util .Collection ;
54-
5555/**
5656 * @deprecated as of 5.0.5.Final In a subsequent release we will change packages names in order to
5757 * provide a better separation between public and internal classes.
@@ -184,8 +184,15 @@ public void aaTest(boolean replay) throws Exception {
184184 osb .start ();
185185 osb .probe ();
186186
187- // there should be one MBean corresponding to the AtomicAction A and the MBean should wrap an ActionBean
188- ActionBean actionBean = lookupActionBean (osb , A .get_uid ());
187+ // there should be one MBean corresponding to the AtomicAction A
188+ UidWrapper w = osb .findUid (A .get_uid ());
189+ assertNotNull (w );
190+ OSEntryBean ai = w .getMBean ();
191+ assertNotNull (ai );
192+
193+ // the MBean should wrap an ActionBean
194+ assertTrue (ai instanceof ActionBean );
195+ ActionBean actionBean = (ActionBean ) ai ;
189196
190197 // and there should be one MBean corresponding to the CrashRecord that got the heuristic:
191198 int recCount = 0 ;
@@ -206,16 +213,6 @@ public void aaTest(boolean replay) throws Exception {
206213
207214 assertEquals (1 , recCount );
208215
209- // verify that the state on disk is no longer a heuristic
210- actionBean = lookupActionBean (osb , A .get_uid ());
211- Collection <LogRecordWrapper > participants = actionBean .getParticipants ();
212-
213- // there should be only the heuristic participant remaining:
214- assertEquals (1 , participants .size ());
215- LogRecordWrapper wrapper = actionBean .getParticipants ().iterator ().next ();
216- // and it should no longer be a heuristic
217- assertFalse (wrapper .isHeuristic ());
218-
219216 if (!replay ) {
220217 actionBean .remove ();
221218 } else {
@@ -233,21 +230,13 @@ public void aaTest(boolean replay) throws Exception {
233230 osb .probe ();
234231
235232 // look up the MBean and verify that it no longer exists
236- assertNull (osb .findUid (A .get_uid ()));
233+ w = osb .findUid (A .get_uid ());
234+ assertNull (w );
237235
236+ osb .dump (new StringBuilder ());
238237 osb .stop ();
239238 }
240239
241- private ActionBean lookupActionBean (ObjStoreBrowser osb , Uid uid ) {
242- UidWrapper w = osb .findUid (uid );
243- assertNotNull (w );
244- OSEntryBean ai = w .getMBean ();
245- assertNotNull (ai );
246- assertTrue (ai instanceof ActionBean );
247-
248- return (ActionBean ) ai ;
249- }
250-
251240 // define an MBean interface for use in the next test
252241 public interface NotAnotherMBean extends ObjStoreItemMBean {}
253242
0 commit comments