Bug 271431

Summary: kfileplacesmodeltest test failure
Product: [Unmaintained] kdelibs Reporter: Frank Reininghaus <frank78ac>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ervin, faure, frank78ac, mbensi
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Frank Reininghaus 2011-04-21 16:33:25 UTC
Version:           unspecified (using Devel) 
OS:                Linux

The kdelibs commit

https://projects.kde.org/projects/kde/kdelibs/repository/revisions/75a0eb52723aa739626266bd622783f4ba154fd0

has caused kfileplacesmodeltest to fail. The additions to fakecomputer.xml cause failures like

FAIL!  : KFilePlacesModelTest::testInitialState() Compared values are not the same
   Actual (m_places->rowCount()): 9
   Expected (8): 8
   Loc: [/home/kde-devel/kde/src/KDE/kdelibs/kfile/tests/kfileplacesmodeltest.cpp(160)]

and

FAIL!  : KFilePlacesModelTest::testDeviceSetupTeardown() Compared values are not the same
   Actual (spy_changed.count()): 0
   Expected (1): 1
   Loc: [/home/kde-devel/kde/src/KDE/kdelibs/kfile/tests/kfileplacesmodeltest.cpp(680)]


Reproducible: Always
Comment 1 Frank Reininghaus 2011-04-21 16:36:45 UTC
I'm not neither familiar with the file 'fakecomputer.xml' nor with KFilePlacesModel, so I'll CC Mario who made the commit causing the test failure and Kevin and David who are the authors of the test.
Comment 2 Frank Reininghaus 2011-05-25 15:27:22 UTC
Git commit eb0160d7682855b3f396e54323ca3e7166bb39fd by Frank Reininghaus.
Committed on 18/05/2011 at 10:52.
Pushed by freininghaus into branch 'master'.

Fix KFilePlacesModelTest failure

KFilePlacesModelTest uses data from
solid/backends/fakehw/fakecomputer.xml. That file was modified in commit
75a0eb52, causing the test to fail because the new place "/media/nfs"
was not taken into account. This commit fixes the failures by adding
that place to the list of expected URLs and changing the rows of some
inserted and changed QModelIndexes by 1.

BUG: 271431
REVIEW: 101381

M  +49   -49   kfile/tests/kfileplacesmodeltest.cpp     

http://commits.kde.org/kdelibs/eb0160d7682855b3f396e54323ca3e7166bb39fd