mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-06-22 17:24:38 +08:00
Revert e74f1bf5ab1363a03d36e97661907af3195c651f as it doesn't fix
#11429
This commit is contained in:
parent
e74f1bf5ab
commit
d2c7fac559
@ -57,11 +57,10 @@ TEMPLATE_LIST_TEST_CASE("State should not be idle while running a job", "[Jobs]"
|
||||
}).wait();
|
||||
});
|
||||
|
||||
worker.wait_for_idle();
|
||||
// make sure that the job starts BEFORE the worker.wait_for_idle() is called
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
|
||||
// To avoid stalling the job, in case the wait_for_idle is called before
|
||||
// the job goes into blocking wait
|
||||
worker.process_events();
|
||||
worker.wait_for_idle();
|
||||
|
||||
REQUIRE(worker.is_idle());
|
||||
}
|
||||
@ -79,13 +78,12 @@ TEMPLATE_LIST_TEST_CASE("Status messages should be received by the main thread d
|
||||
});
|
||||
|
||||
worker.wait_for_idle();
|
||||
worker.process_events();
|
||||
|
||||
REQUIRE(pri->pr == 100);
|
||||
REQUIRE(pri->statustxt == "Running");
|
||||
}
|
||||
|
||||
TEMPLATE_LIST_TEST_CASE("Cancellation should be recognized by the worker", "[Jobs]", TestClasses) {
|
||||
TEMPLATE_LIST_TEST_CASE("Cancellation should be recognized be the worker", "[Jobs]", TestClasses) {
|
||||
using namespace Slic3r;
|
||||
using namespace Slic3r::GUI;
|
||||
|
||||
@ -110,7 +108,6 @@ TEMPLATE_LIST_TEST_CASE("Cancellation should be recognized by the worker", "[Job
|
||||
worker.cancel();
|
||||
|
||||
worker.wait_for_current_job();
|
||||
worker.process_events();
|
||||
|
||||
REQUIRE(pri->pr != 100);
|
||||
}
|
||||
@ -148,7 +145,6 @@ TEMPLATE_LIST_TEST_CASE("cancel_all should remove all pending jobs", "[Jobs]", T
|
||||
// during the first job's execution.
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
worker.cancel_all();
|
||||
worker.process_events();
|
||||
|
||||
REQUIRE(jobres[0] == true);
|
||||
REQUIRE(jobres[1] == false);
|
||||
@ -177,7 +173,5 @@ TEMPLATE_LIST_TEST_CASE("Exception should be properly forwarded to finalize()",
|
||||
});
|
||||
|
||||
worker.wait_for_idle();
|
||||
worker.process_events();
|
||||
|
||||
REQUIRE(worker.is_idle());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user