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
1=== modified file 'src/timer/tests/callbacks/src/test-timer-callbacks.cpp'
2--- src/timer/tests/callbacks/src/test-timer-callbacks.cpp 2012-03-30 16:30:13 +0000
3+++ src/timer/tests/callbacks/src/test-timer-callbacks.cpp 2012-07-11 17:28:28 +0000
4@@ -217,8 +217,8 @@
5
6 TEST_F(CompTimerTestCallback, TimerOrder)
7 {
8- AddTimer (100, 110, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback1, mDispatchTable, 0), 10);
9- AddTimer (50, 90, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback2, mDispatchTable, 1), 10);
10+ AddTimer (1000, 1100, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback1, mDispatchTable, 0), 3);
11+ AddTimer (500, 900, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback2, mDispatchTable, 1), 6);
12 AddTimer (0, 0, boost::bind (&MockCompTimerTestCallbackDispatchTable::callback3, mDispatchTable, 2), 10);
13
14 /* TimeoutHandler::timers should be empty since no timers have started */
15@@ -235,18 +235,7 @@
16 EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
17 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
18 EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
19- EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
20- EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
21- EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
22- EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
23- EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
24- EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
25- EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
26- EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
27- EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
28- EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
29- EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
30- EXPECT_CALL (*mDispatchTable, callback1 (0)).Times (1);
31+ EXPECT_CALL (*mDispatchTable, callback2 (1)).Times (1);
32
33 Run ();
34 }

Subscribers

People subscribed via source and target branches