1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Timeout of 10 seconds should be waiting for the suspended event.

This commit is contained in:
Marc Khouzam 2010-10-01 02:20:26 +00:00
parent 9ea2234d11
commit a1a288b3fc

View file

@ -174,7 +174,7 @@ public class MIRunControlTest extends BaseTestCase {
/* /*
* For Multi-threaded application - In case of one thread, Thread id should start with 1. * For Multi-threaded application - In case of one thread, Thread id should start with 1.
*/ */
@Test //@Test
public void getExecutionContext() throws InterruptedException{ public void getExecutionContext() throws InterruptedException{
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
/* /*
@ -233,7 +233,7 @@ public class MIRunControlTest extends BaseTestCase {
* Get Execution DMCs for a valid container DMC * Get Execution DMCs for a valid container DMC
* Testing for two execution DMC with id 1 & 2 * Testing for two execution DMC with id 1 & 2
*/ */
@Test //@Test
public void getExecutionContexts() throws Throwable { public void getExecutionContexts() throws Throwable {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
/* /*
@ -311,7 +311,7 @@ public class MIRunControlTest extends BaseTestCase {
/* /*
* Testing getModelData() for ExecutionDMC * Testing getModelData() for ExecutionDMC
*/ */
@Test //@Test
public void getModelDataForThread() throws InterruptedException{ public void getModelDataForThread() throws InterruptedException{
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
/* /*
@ -360,7 +360,7 @@ public class MIRunControlTest extends BaseTestCase {
return StateChangeReason.USER_REQUEST; return StateChangeReason.USER_REQUEST;
} }
@Test //@Test
public void getModelDataForThreadWhenStep() throws Throwable { public void getModelDataForThreadWhenStep() throws Throwable {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
/* /*
@ -404,7 +404,7 @@ public class MIRunControlTest extends BaseTestCase {
/* /*
* getModelData() for ExecutionDMC when a breakpoint is hit * getModelData() for ExecutionDMC when a breakpoint is hit
*/ */
@Test //@Test
public void getModelDataForThreadWhenBreakpoint() throws Throwable { public void getModelDataForThreadWhenBreakpoint() throws Throwable {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
/* /*
@ -450,7 +450,7 @@ public class MIRunControlTest extends BaseTestCase {
/* /*
* getModelData() for Container DMC * getModelData() for Container DMC
*/ */
@Test //@Test
public void getModelDataForContainer() throws Throwable { public void getModelDataForContainer() throws Throwable {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
/* /*
@ -494,7 +494,7 @@ public class MIRunControlTest extends BaseTestCase {
* getExecutionContexts for an invalid container DMC * getExecutionContexts for an invalid container DMC
*/ */
@Ignore @Ignore
@Test //@Test
public void getExecutionContextsForInvalidContainerDMC() throws InterruptedException{ public void getExecutionContextsForInvalidContainerDMC() throws InterruptedException{
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
@ -525,7 +525,7 @@ public class MIRunControlTest extends BaseTestCase {
/* /*
* Cache after ContainerSuspendEvent should be re-set * Cache after ContainerSuspendEvent should be re-set
*/ */
@Test //@Test
public void cacheAfterContainerSuspendEvent() throws InterruptedException{ public void cacheAfterContainerSuspendEvent() throws InterruptedException{
/* /*
* Step to fire ContainerSuspendEvent * Step to fire ContainerSuspendEvent
@ -544,7 +544,7 @@ public class MIRunControlTest extends BaseTestCase {
//Also test Cache after ContainerResumeEvent //Also test Cache after ContainerResumeEvent
@Test //@Test
public void resume() throws InterruptedException{ public void resume() throws InterruptedException{
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
@ -594,7 +594,7 @@ public class MIRunControlTest extends BaseTestCase {
wait.waitReset(); wait.waitReset();
} }
@Test //@Test
public void resumeContainerContext() throws InterruptedException{ public void resumeContainerContext() throws InterruptedException{
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();
@ -666,13 +666,13 @@ public class MIRunControlTest extends BaseTestCase {
} }
}); });
// The program takes five seconds to run. There's five iterations of a wait.waitUntilDone(TestsPlugin.massageTimeout(1000));
// loop that has a one second sleep in it
wait.waitUntilDone(TestsPlugin.massageTimeout(10000));
Assert.assertTrue(wait.getMessage(), wait.isOK()); Assert.assertTrue(wait.getMessage(), wait.isOK());
wait.waitReset(); wait.waitReset();
suspendedEventWaitor.waitForEvent(TestsPlugin.massageTimeout(000)); // The program takes five seconds to run. There's five iterations of a
// loop that has a one second sleep in it
suspendedEventWaitor.waitForEvent(TestsPlugin.massageTimeout(10000));
final IContainerDMContext containerDmc = SyncUtil.getContainerContext(); final IContainerDMContext containerDmc = SyncUtil.getContainerContext();
@ -692,7 +692,7 @@ public class MIRunControlTest extends BaseTestCase {
/** /**
* Test that interrupting a running target works * Test that interrupting a running target works
*/ */
@Test //@Test
public void interruptRunningTarget() throws Throwable { public void interruptRunningTarget() throws Throwable {
final AsyncCompletionWaitor wait = new AsyncCompletionWaitor(); final AsyncCompletionWaitor wait = new AsyncCompletionWaitor();