From: Jocelyn Turcotte Date: Wed, 8 Feb 2017 16:31:13 +0000 (+0100) Subject: Fix TestSyncEngine::abortAfterFailedMkdir (again) X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~805 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ddb6b3b2625f41e0271c82e2bf1adedbc462b0db;p=nextcloud-desktop.git Fix TestSyncEngine::abortAfterFailedMkdir (again) It could be possible that _firstJob is marked as finished if aborted before its parent PropagateDirectory was marked as finished, allowing a posted scheduleNextJob call to schedule the child job in-between. --- diff --git a/src/libsync/owncloudpropagator.h b/src/libsync/owncloudpropagator.h index ef5db3b1e..5a3763d49 100644 --- a/src/libsync/owncloudpropagator.h +++ b/src/libsync/owncloudpropagator.h @@ -227,7 +227,7 @@ public: private slots: bool possiblyRunNextJob(PropagatorJob *next) { if (next->_state == NotYetStarted) { - connect(next, SIGNAL(finished(SyncFileItem::Status)), this, SLOT(slotSubJobFinished(SyncFileItem::Status)), Qt::QueuedConnection); + connect(next, SIGNAL(finished(SyncFileItem::Status)), this, SLOT(slotSubJobFinished(SyncFileItem::Status))); connect(next, SIGNAL(itemCompleted(const SyncFileItemPtr &)), this, SIGNAL(itemCompleted(const SyncFileItemPtr &))); connect(next, SIGNAL(progress(const SyncFileItem &,quint64)), this, SIGNAL(progress(const SyncFileItem &,quint64))); connect(next, SIGNAL(ready()), this, SIGNAL(ready())); diff --git a/test/testsyncengine.cpp b/test/testsyncengine.cpp index ae5296ea1..31f15df8e 100644 --- a/test/testsyncengine.cpp +++ b/test/testsyncengine.cpp @@ -214,7 +214,6 @@ private slots: } void abortAfterFailedMkdir() { - QSKIP("Skip for 2.3"); FakeFolder fakeFolder{FileInfo{}}; QSignalSpy finishedSpy(&fakeFolder.syncEngine(), SIGNAL(finished(bool))); fakeFolder.serverErrorPaths().append("NewFolder");