Skip to content

Commit 5e1184a

Browse files
committed
More task test debugging, fixes
1 parent 7b971e2 commit 5e1184a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/src/core/testqgstaskmanager.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -711,20 +711,21 @@ void TestQgsTaskManager::taskId()
711711

712712
//create manager with some tasks
713713
QgsTaskManager manager;
714-
TestTask *task = new TestTask();
715-
TestTask *task2 = new TestTask();
714+
TestTask *task = new TestTask( QStringLiteral( "task_id_1" ) );
715+
TestTask *task2 = new TestTask( QStringLiteral( "task_id_2" ) );
716716
manager.addTask( task );
717717
manager.addTask( task2 );
718718

719719
//also a task not in the manager
720-
TestTask *task3 = new TestTask();
720+
TestTask *task3 = new TestTask( QStringLiteral( "task_id_3" ) );
721721

722722
QCOMPARE( manager.taskId( nullptr ), -1L );
723723
QCOMPARE( manager.taskId( task ), 1L );
724724
QCOMPARE( manager.taskId( task2 ), 2L );
725725
QCOMPARE( manager.taskId( task3 ), -1L );
726726

727727
delete task3;
728+
flushEvents();
728729
}
729730

730731
void TestQgsTaskManager::waitForFinished()

0 commit comments

Comments
 (0)