Merge lp:~mzanetti/ubuntu-ui-toolkit/more-stable-ubuntulistview-tests into lp:ubuntu-ui-toolkit

Proposed by Michael Zanetti
Status: Merged
Approved by: Zsombor Egri
Approved revision: 956
Merged at revision: 969
Proposed branch: lp:~mzanetti/ubuntu-ui-toolkit/more-stable-ubuntulistview-tests
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 19 lines (+2/-0)
1 file modified
tests/unit_x11/tst_components/tst_ubuntulistview.qml (+2/-0)
To merge this branch: bzr merge lp:~mzanetti/ubuntu-ui-toolkit/more-stable-ubuntulistview-tests
Reviewer Review Type Date Requested Status
Tim Peeters Approve
Zsombor Egri Approve
Timo Jyrinki Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+209503@code.launchpad.net

Commit message

Make the UbuntuListView tests more stable

Description of the change

This should hopefully help to make the random failures in the build ppa go away. I wasn't able to reproduce the exact same errors, but without this patch I could make it fail every once in a while if running the test suite in an endless loop. With this patch I couldn't make it fail once in my setup here.

* Are there any related MPs required for this MP to build/function as expected? Please list.

N/A

* Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

Yes

* Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

N/A (Only tests changed.)

* Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/ui-toolkit) on device or emulator?

No.

* If you changed the UI, was the change specified/approved by design?

N/A

* If you changed the packaging (debian), did you subscribe a core-dev to this MP?

N/A

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Jenkins fails on it... please check and let's return once we get Jenkins green.

review: Needs Fixing
Revision history for this message
Michael Zanetti (mzanetti) wrote :

The test failures are autopilot tests. There's no way those are related to this change, as this code is not even loaded while running autopilot tests.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :
review: Approve
Revision history for this message
Zsombor Egri (zsombi) wrote :

Thanks for fixing it.

review: Approve
Revision history for this message
Tim Peeters (tpeeters) wrote :

I get the error that this MR fixes (without applying the changes proposed here) in a branch when I run 'make check' with Qt 5.0.2:

********* Start testing of components *********
Config: Using QTest library 5.0.2, Qt 5.0.2
PASS : components::UbuntuListView::initTestCase()
PASS : components::UbuntuListView::test_collapseByClickingOutside()
PASS : components::UbuntuListView::test_destroyAndRecreateExpanded()
PASS : components::UbuntuListView::test_dimOthers()
PASS : components::UbuntuListView::test_expandedItem()
FAIL! : components::UbuntuListView::test_noScrollingNeeded() Compared values are not the same with delta(0.5)
   Actual (): -272.084628099174
   Expected (): 48
   Loc: [/home/tim/dev/ubuntu-ui-toolkit/tabsModelIndex/tests/unit_x11/tst_components/tst_ubuntulistview.qml(119)]
PASS : components::UbuntuListView::test_scrollIntoView()
FAIL! : components::UbuntuListView::test_scrollToTop() Compared values are not the same with delta(0.5)
   Actual (): -96.0846280991736
   Expected (): 0
   Loc: [/home/tim/dev/ubuntu-ui-toolkit/tabsModelIndex/tests/unit_x11/tst_components/tst_ubuntulistview.qml(131)]
PASS : components::UbuntuListView::cleanupTestCase()
Totals: 7 passed, 2 failed, 0 skipped
********* Finished testing of components *********

After merging lp:~mzanetti/ubuntu-ui-toolkit/more-stable-ubuntulistview-tests I didn't get the failure anymore, so the MR seems to fix the bug for Qt50 also.

Revision history for this message
Tim Peeters (tpeeters) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/unit_x11/tst_components/tst_ubuntulistview.qml'
2--- tests/unit_x11/tst_components/tst_ubuntulistview.qml 2014-02-25 13:31:15 +0000
3+++ tests/unit_x11/tst_components/tst_ubuntulistview.qml 2014-03-05 17:12:09 +0000
4@@ -82,6 +82,7 @@
5 ubuntuListView.expandedIndex = index;
6 var targetHeight = Math.min(item.expandedHeight, ubuntuListView.height - item.collapsedHeight);
7 tryCompare(item, "height", targetHeight);
8+ waitForRendering(ubuntuListView)
9 }
10
11 function collapse() {
12@@ -92,6 +93,7 @@
13 var expandedItem = findChild(ubuntuListView, "expandable" + ubuntuListView.expandedIndex);
14 ubuntuListView.expandedIndex = -1;
15 tryCompare(expandedItem, "height", expandedItem.collapsedHeight);
16+ waitForRendering(ubuntuListView);
17 }
18
19 function test_expandedItem() {

Subscribers

People subscribed via source and target branches

to status/vote changes: