| Age | Commit message (Collapse) | Author |
|
I noticed unexpected unit test failures when running the tests with
Valgrind. The reason was that test execution was slowed down a lot,
such that that TestBase::waitForFinishedPathLoading() did not receive
the view's signal within the default timeout of 2 seconds, and that
this failure was not detected in every test -> the tests failed later
on because not all expected items had been loaded yet.
To fix this, I changed two things:
1. Added an assert in TestBase::waitForFinishedPathLoading() that checks
if the signal has been received. Continuing does not make much sense if
that is not the case.
2. Increased the default timeout to 20 seconds. The reason why there is
a finite timeout at all is that I didn't want to waste too much time on
machines where the file kioslave seems to have problems loading a
directory (I've seen corresponding test logs at cdash.org). However, with
the first change I mentioned above, the waiting time is lost only once
(due to the assert) rather than every time a directory is loaded
-> I think that the timeout increase does not lead to an increased waste
of time on such machines.
|
|
|
|
Many tests have to wait until this signal is received from the
DolphinView, so it is convenient to have a function that wraps
the QTest::kWaitForSignal() call.
|
|
This commit changes mainly two things:
1. The functionality related to the handling of temporary files and
folders is moved to a new class TestDir.
2. The setup of a temporary folder and of DolphinView instances is
now done in each unit test function. A benefit of this change is that
there are no unwanted interactions between different unit test functions
any more. Moreover, different test functions could now share a test
folder more easily.
Additionally, the reference arguments of all functions are changed to
pointers for consistency.
|
|
|
|
related to the folder view properties.
svn path=/trunk/KDE/kdebase/apps/; revision=1216359
|
|
proxy model to DolphinView. By this it will be easier later to replace the traditional QAbstractItemViews by any kind of other implementation (e.g. based on QGraphicsView/QML).
svn path=/trunk/KDE/kdebase/apps/; revision=1213189
|
|
2. Reduce the time out for the finishedPathLoading signal.
svn path=/trunk/KDE/kdebase/apps/; revision=1202815
|
|
also added a timeout such that the tests fail rather than hang if the
file kioslave dies (which happens sometimes according to some test
logs on cdash.org).
svn path=/trunk/KDE/kdebase/apps/; revision=1202159
|
|
2. Remove some debug output from DolphinDetailsViewTest - it seems
that the test failure I saw on cdash.org is due to a failing kioslave,
which is probably not Dolphin's fault.
svn path=/trunk/KDE/kdebase/apps/; revision=1194514
|
|
a common base class. I took that idea from Nepomuk's unit tests in
kdelibs.
svn path=/trunk/KDE/kdebase/apps/; revision=1191051
|