Fix TestSyncEngine::abortAfterFailedMkdir
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.
Esse commit está contido em:
@@ -662,7 +662,7 @@ void PropagateDirectory::slotSubJobFinished(SyncFileItem::Status status)
|
||||
bool wasFirstJob = false;
|
||||
if (subJob == _firstJob.data()) {
|
||||
wasFirstJob = true;
|
||||
_firstJob.reset();
|
||||
_firstJob.take();
|
||||
} else {
|
||||
int i = _subJobs.indexOf(subJob);
|
||||
ASSERT(i >= 0);
|
||||
|
||||
@@ -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()));
|
||||
|
||||
@@ -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");
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário