Permalink
Browse files

JBTM-1292 Add delay for all XTS ParticipantCompletion tests

  • Loading branch information...
paulrobinson committed Oct 9, 2012
1 parent 0f280ee commit 96ced73029abe9ff92984e79fcfd87e1288c0d7c
@@ -68,6 +68,8 @@ public void testClose()
throw eouter;
}
+ //[JBTM-1292]
+ Thread.sleep(3*1000);
uba.close();
assertTrue(p.passed());
@@ -70,6 +70,8 @@ public void testCompensate()
throw eouter;
}
+ //[JBTM-1292]
+ Thread.sleep(3*1000);
uba.cancel();
assertTrue(p.passed());
@@ -69,6 +69,8 @@ public void testExit()
throw eouter;
}
+ //[JBTM-1292]
+ Thread.sleep(3*1000);
uba.close();
assertTrue(p.passed());
@@ -75,6 +75,8 @@ public void testMultiClose()
throw eouter;
}
// the close should succeed even though the participant fails
+ //[JBTM-1292]
+ Thread.sleep(3*1000);
uba.close();
assertTrue(p.passed());
}
@@ -67,16 +67,8 @@ public void testClose()
throw eouter;
}
- //[JBTM-1202]
- //the asynchronous call to bpm.completed() is taking too long
- //and then uba.close() is invoked before the coordinator has received word
- //that the participant has completed.
- //As the participant is not competed, the coordinator will cancel the participant
- //and the UBA will throw a TransactionRolledBackException
- //
- //we add delay 10s before uba.close() to give the participant time to complete.
- //It's a hack and not guaranteed to work.
- Thread.sleep(10*1000);
+ //[JBTM-1292]
+ Thread.sleep(3*1000);
uba.close();
assertTrue(p.passed());
@@ -68,6 +68,8 @@ public void testExit()
throw eouter;
}
+ //[JBTM-1292]
+ Thread.sleep(3*1000);
uba.close();
assertTrue(p.passed());
@@ -73,7 +73,8 @@ public void testMultiClose()
}
throw eouter;
}
- // the close should succeed even though the participant fails
+ //[JBTM-1292]
+ Thread.sleep(3*1000);
uba.close();
assertTrue(p.passed());
}

0 comments on commit 96ced73

Please sign in to comment.