Merge lp:~vanvugt/compiz/fix-1021139 into lp:compiz/0.9.8

Proposed by Sam Spilsbury
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3283
Merged at revision: 3293
Proposed branch: lp:~vanvugt/compiz/fix-1021139
Merge into: lp:compiz/0.9.8
Diff against target: 34 lines (+3/-14)
1 file modified
src/timer/tests/callbacks/src/test-timer-callbacks.cpp (+3/-14)
To merge this branch: bzr merge lp:~vanvugt/compiz/fix-1021139
Reviewer Review Type Date Requested Status
jenkins (community) continuous-integration Approve
Sam Spilsbury Approve
Review via email: mp+114473@code.launchpad.net

This proposal supersedes a proposal from 2012-07-11.

Commit message

Fixed CompTimerTestCallback.TimerOrder failure on slow systems (like valgrind)
(LP: #1021139)

If the environment (like valgrind in ExperimentalMemCheck) is so slow that it
took more than 50ms to schedule the tests, then they would all be overdue
on startup (instead of just one of them) and the order would not be
predictable. So I spread the timers out over longer intervals and reduced
the number of repetitions to stop the new test from taking too long.

Description of the change

Fixed CompTimerTestCallback.TimerOrder failure on slow systems (like valgrind)
(LP: #1021139)

If the environment (like valgrind in ExperimentalMemCheck) is so slow that it
took more than 50ms to schedule the tests, then they would all be overdue
on startup (instead of just one of them) and the order would not be
predictable. So I spread the timers out over longer intervals and reduced
the number of repetitions to stop the new test from taking too long.

To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal

CI failure incorrect, resubmitting

Revision history for this message
Sam Spilsbury (smspillaz) :
review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

No commit message specified.

Revision history for this message
jenkins (martin-mrazik+qa) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/timer/tests/callbacks/src/test-timer-callbacks.cpp'
--- src/timer/tests/callbacks/src/test-timer-callbacks.cpp 2012-03-30 16:30:13 +0000
+++ src/timer/tests/callbacks/src/test-timer-callbacks.cpp 2012-07-11 17:28:28 +0000
@@ -217,8 +217,8 @@
217217
218TEST_F(CompTimerTestCallback, TimerOrder)218TEST_F(CompTimerTestCallback, TimerOrder)
219{219{
220 AddTimer (100, 110, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback1, mDispatchTable, 0), 10);220 AddTimer (1000, 1100, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback1, mDispatchTable, 0), 3);
221 AddTimer (50, 90, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback2, mDispatchTable, 1), 10);221 AddTimer (500, 900, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback2, mDispatchTable, 1), 6);
222 AddTimer (0, 0, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback3, mDispatchTable, 2), 10);222 AddTimer (0, 0, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback3, mDispatchTable, 2), 10);
223223
224 /* TimeoutHandler::timers should be empty since no timers have started */224 /* TimeoutHandler::timers should be empty since no timers have started */
@@ -235,18 +235,7 @@
235 EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);235 EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
236 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);236 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
237 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);237 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
238 EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);238 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
239 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
240 EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
241 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
242 EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
243 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
244 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
245 EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
246 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
247 EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
248 EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
249 EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
250239
251 Run ();240 Run ();
252}241}

Subscribers

People subscribed via source and target branches