Skip to content

Commit

Permalink
JBTM-2804 Use a non-threaded recovery manager and invoke the local sc…
Browse files Browse the repository at this point in the history
…an operation to be more deterministic
  • Loading branch information
tomjenkinson committed Nov 30, 2016
1 parent edd0910 commit 6873862
Showing 1 changed file with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,14 @@
@Deprecated // in order to provide a better separation between public and internal classes.
public class ObjStoreBrowserTest {
private RecoveryManagerImple rcm;
private RecoveryDriver rd;

@Before
public void setUp () throws Exception
{
// enable socket based recovery
recoveryPropertyManager.getRecoveryEnvironmentBean().setRecoveryListener(true);
recoveryPropertyManager.getRecoveryEnvironmentBean().setPeriodicRecoveryPeriod(1);
recoveryPropertyManager.getRecoveryEnvironmentBean().setRecoveryBackoffPeriod(1);

rcm = new RecoveryManagerImple(true);
rcm = new RecoveryManagerImple(false);
rcm.addModule(new AtomicActionRecoveryModule());
rd = new RecoveryDriver(RecoveryManager.getRecoveryManagerPort(),
recoveryPropertyManager.getRecoveryEnvironmentBean().getRecoveryAddress(), 100000);
}

@After
Expand Down Expand Up @@ -144,9 +138,8 @@ public void basicOSBTest () throws Exception
@Test
public void aaReplayTest() throws Exception {
// TODO windows
if (System.getProperty("os.name").toLowerCase().indexOf("windows") == -1) {
aaTest(true);
}

}

/**
Expand All @@ -157,9 +150,7 @@ public void aaReplayTest() throws Exception {
@Test
public void aaRemoveTest() throws Exception {
// TODO windows
if (System.getProperty("os.name").toLowerCase().indexOf("windows") == -1) {
aaTest(false);
}
}

public void aaTest(boolean replay) throws Exception {
Expand Down Expand Up @@ -227,8 +218,7 @@ public void aaTest(boolean replay) throws Exception {
* prompt the recovery manager to replay the record that was
* moved off the heuristic list and back onto the prepared list
*/
rd.synchronousScan();
Thread.sleep(1000); // odd without the delay running under Jacoco fails
rcm.scan();
}

/*
Expand Down

0 comments on commit 6873862

Please sign in to comment.