def METHOD_NAME(self) -> None:
    self.vm.event_wait('BLOCK_JOB_READY')
    # Write something so will not leave the job immediately, but
    # flush first (which will fail, thanks to blkdebug)
    res = self.vm.qmp('human-monitor-command',
                      command_line='qemu-io mirror-top "write -P 2 0 64k"')
    self.assert_qmp(res, 'return', '')
    # Drain status change events
    while self.vm.event_wait('JOB_STATUS_CHANGE', timeout=0.0) is not None:
        pass
    res = self.vm.qmp('block-job-cancel', device='mirror')
    self.assert_qmp(res, 'return', {})
    self.vm.event_wait('BLOCK_JOB_ERROR')