mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-01 21:35:40 +02:00
Bug 515307: Run test order of magnitude faster
Remove massage timeouts for places waiting for no events
This is a partial revert of c19640498d
which was part of Bug 499784.
Change-Id: Ib66ed5eaf45977d4ffae77358deaf1f593e005c6
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
This commit is contained in:
parent
54f2d8770f
commit
1670530ffb
1 changed files with 31 additions and 91 deletions
|
@ -754,13 +754,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected not to find all threads suspended, but did", result);
|
assertFalse("expected not to find all threads suspended, but did", result);
|
||||||
|
|
||||||
// Make sure no other running event arrives
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
try {
|
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500));
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -848,12 +842,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no threads to be suspended, but found some", result);
|
assertFalse("expected no threads to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other running event arrives
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -900,12 +889,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no threads to be suspended, but found some", result);
|
assertFalse("expected no threads to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1102,12 +1086,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected that not all threads are suspended, but they are", result);
|
assertFalse("expected that not all threads are suspended, but they are", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitor);
|
||||||
eventWaitor.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other stopped event arrives
|
|
||||||
fail("Got an unexpected stopped event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2783,12 +2762,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no process to be suspended, but found some", result);
|
assertFalse("expected no process to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other running event arrives
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2835,12 +2809,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no threads to be suspended, but found some", result);
|
assertFalse("expected no threads to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -3132,14 +3101,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no contexts to be suspended, but found some", result);
|
assertFalse("expected no contexts to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitor);
|
||||||
// TODO: This Test is failing when using TestsPlugin.massageTimeout,
|
|
||||||
// Investigate if the failure with massageTimeout is justified
|
|
||||||
eventWaitor.waitForEvent(500); // Make sure no running events arrive
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3180,14 +3142,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no contexts to be suspended, but found some", result);
|
assertFalse("expected no contexts to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitor);
|
||||||
// TODO: This Test is failing when using TestsPlugin.massageTimeout,
|
|
||||||
// Investigate if the failure with massageTimeout is justified
|
|
||||||
eventWaitor.waitForEvent(500); // Make sure no running events arrive
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3231,12 +3186,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no process to be suspended, but found some", result);
|
assertFalse("expected no process to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3284,12 +3234,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no process to be suspended, but found some", result);
|
assertFalse("expected no process to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other running event arrives
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3337,12 +3282,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no process to be suspended, but found some", result);
|
assertFalse("expected no process to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other running event arrives
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3390,8 +3330,23 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no threads to be suspended, but found some", result);
|
assertFalse("expected no threads to be suspended, but found some", result);
|
||||||
|
|
||||||
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Asserts that after a reasonable amount of time that no unexpected events
|
||||||
|
* are received.
|
||||||
|
*/
|
||||||
|
private void assertNoEventsArrive(final ServiceEventWaitor<?> eventWaitor) {
|
||||||
try {
|
try {
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
|
/*
|
||||||
|
* Don't massage this timeout, we are waiting to make sure events
|
||||||
|
* don't arrive. If we massage timeout we end up waiting much longer
|
||||||
|
* than test expected or makes any sense. See
|
||||||
|
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=515307#c5 for
|
||||||
|
* history as to why this timeout is not massaged.
|
||||||
|
*/
|
||||||
|
eventWaitor.waitForEvent(500);
|
||||||
fail("Got an unexpected running event");
|
fail("Got an unexpected running event");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// Timeout expected. Success.
|
// Timeout expected. Success.
|
||||||
|
@ -3760,12 +3715,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no process to be suspended, but found some", result);
|
assertFalse("expected no process to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3813,12 +3763,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no process to be suspended, but found some", result);
|
assertFalse("expected no process to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no other running event arrives
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3866,12 +3811,7 @@ public class GDBMultiNonStopRunControlTest extends BaseParametrizedTestCase {
|
||||||
});
|
});
|
||||||
assertFalse("expected no threads to be suspended, but found some", result);
|
assertFalse("expected no threads to be suspended, but found some", result);
|
||||||
|
|
||||||
try {
|
assertNoEventsArrive(eventWaitorRunning);
|
||||||
eventWaitorRunning.waitForEvent(TestsPlugin.massageTimeout(500)); // Make sure no running events arrive
|
|
||||||
fail("Got an unexpected running event");
|
|
||||||
} catch (Exception e) {
|
|
||||||
// Timeout expected. Success.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Reference in a new issue