jobtest: add test for killing a subjob

Authored by dfaure on Mar 11 2019, 10:04 PM.

Description

jobtest: add test for killing a subjob

Summary:

  • it turns out that the whole job gets terminated
  • after changing FakeSession to delay reconnect like Session,

the unittest actually makes more sense (no more comment about signal not
received because emitted from the constructor)

  • call socketDisconnected like Session ends up doing

The main point was to debug a crash I was having in TransactionSequence
when killing subjobs in rollback(). The take away is that disconnecting
from slotResult is a horrible idea, it means mCurrentSubJob stays
dangling and later lostConnection() crashes. Disconnecting is currently
only done for non-running jobs, but too much code sharing brought me into
that bug :)

Reviewers: dvratil

Reviewed By: dvratil

Subscribers: kde-pim

Tags: KDE PIM

Differential Revision: https://phabricator.kde.org/D19742

Details

Committed
dfaureMar 21 2019, 10:28 PM
Reviewer
dvratil
Differential Revision
D19742: jobtest: add test for killing a subjob
Parents
R165:aad2d379c524: Fix infinite recursion
Branches
Unknown
Tags
Unknown
References
tag: v19.03.80