[partition] Fix tests after removal of single-job-enqueue
This commit is contained in:
parent
c296bcffa3
commit
08ea51a344
@ -223,7 +223,7 @@ PartitionJobTests::queuePartitionTableCreation( PartitionTable::TableType type )
|
||||
{
|
||||
auto job = new CreatePartitionTableJob( m_device.data(), type );
|
||||
job->updatePreview();
|
||||
m_queue.enqueue( job_ptr( job ) );
|
||||
m_queue.enqueue( 1, JobList() << job_ptr( job ) );
|
||||
}
|
||||
|
||||
CreatePartitionJob*
|
||||
@ -275,7 +275,7 @@ PartitionJobTests::testCreatePartition()
|
||||
Partition* partition1 = job->partition();
|
||||
QVERIFY( partition1 );
|
||||
job->updatePreview();
|
||||
m_queue.enqueue( job_ptr( job ) );
|
||||
m_queue.enqueue( 1, JobList() << job_ptr( job ) );
|
||||
|
||||
freePartition = firstFreePartition( m_device->partitionTable() );
|
||||
QVERIFY( freePartition );
|
||||
@ -283,7 +283,7 @@ PartitionJobTests::testCreatePartition()
|
||||
Partition* partition2 = job->partition();
|
||||
QVERIFY( partition2 );
|
||||
job->updatePreview();
|
||||
m_queue.enqueue( job_ptr( job ) );
|
||||
m_queue.enqueue( 1, JobList() << job_ptr( job ) );
|
||||
|
||||
freePartition = firstFreePartition( m_device->partitionTable() );
|
||||
QVERIFY( freePartition );
|
||||
@ -291,7 +291,7 @@ PartitionJobTests::testCreatePartition()
|
||||
Partition* partition3 = job->partition();
|
||||
QVERIFY( partition3 );
|
||||
job->updatePreview();
|
||||
m_queue.enqueue( job_ptr( job ) );
|
||||
m_queue.enqueue( 1, JobList() << job_ptr( job ) );
|
||||
|
||||
QVERIFY( m_runner.run() );
|
||||
|
||||
@ -316,14 +316,14 @@ PartitionJobTests::testCreatePartitionExtended()
|
||||
Partition* partition1 = job->partition();
|
||||
QVERIFY( partition1 );
|
||||
job->updatePreview();
|
||||
m_queue.enqueue( job_ptr( job ) );
|
||||
m_queue.enqueue( 1, JobList() << job_ptr( job ) );
|
||||
|
||||
freePartition = firstFreePartition( m_device->partitionTable() );
|
||||
QVERIFY( freePartition );
|
||||
job = newCreatePartitionJob(
|
||||
freePartition, PartitionRole( PartitionRole::Extended ), FileSystem::Extended, 10_MiB );
|
||||
job->updatePreview();
|
||||
m_queue.enqueue( job_ptr( job ) );
|
||||
m_queue.enqueue( 1, JobList() << job_ptr( job ) );
|
||||
Partition* extendedPartition = job->partition();
|
||||
|
||||
freePartition = firstFreePartition( extendedPartition );
|
||||
@ -332,7 +332,7 @@ PartitionJobTests::testCreatePartitionExtended()
|
||||
Partition* partition2 = job->partition();
|
||||
QVERIFY( partition2 );
|
||||
job->updatePreview();
|
||||
m_queue.enqueue( job_ptr( job ) );
|
||||
m_queue.enqueue( 1, JobList() << job_ptr( job ) );
|
||||
|
||||
QVERIFY( m_runner.run() );
|
||||
|
||||
@ -394,7 +394,7 @@ PartitionJobTests::testResizePartition()
|
||||
KPM_PARTITION_FLAG( None ) );
|
||||
CreatePartitionJob* job = new CreatePartitionJob( m_device.data(), partition );
|
||||
job->updatePreview();
|
||||
m_queue.enqueue( job_ptr( job ) );
|
||||
m_queue.enqueue( 1, JobList() << job_ptr( job ) );
|
||||
|
||||
QVERIFY( m_runner.run() );
|
||||
}
|
||||
@ -418,7 +418,7 @@ PartitionJobTests::testResizePartition()
|
||||
// Resize
|
||||
ResizePartitionJob* job = new ResizePartitionJob( m_device.data(), partition, newFirst, newLast );
|
||||
job->updatePreview();
|
||||
m_queue.enqueue( job_ptr( job ) );
|
||||
m_queue.enqueue( 1, JobList() << job_ptr( job ) );
|
||||
QVERIFY( m_runner.run() );
|
||||
|
||||
QCOMPARE( partition->firstSector(), newFirst );
|
||||
|
Loading…
Reference in New Issue
Block a user