diff --git a/tests/dsl/Idle.cpp b/tests/dsl/Idle.cpp index a5b09d36d..d313432b4 100644 --- a/tests/dsl/Idle.cpp +++ b/tests/dsl/Idle.cpp @@ -35,10 +35,11 @@ struct SimpleMessage { int data; }; -constexpr int time_step = 100; +constexpr int time_step = 50; class TestReactor : public test_util::TestBase { public: + template struct CustomPool { static constexpr int thread_count = 2; }; @@ -75,20 +76,24 @@ class TestReactor : public test_util::TestBase { on>, MainThread>().then([this] { mrh.unbind(); }); // Idle testing for custom pool - on>, Pool>().then([this] { do_step<16>("Custom Startup"); }); - on>, Pool>().then([this] { do_step<17>("Custom Step"); }); - on>, Pool>().then([this] { do_step<18>("Custom Step"); }); - crh = on>>().then([this] { do_step<19>("Custom Idle"); }); - on>, Pool>().then([this] { do_step<20>("Custom Step"); }); - on>, Pool>().then([this] { do_step<21>("Custom Step"); }); - on>, Pool>().then([this] { do_step<22>("Custom Step"); }); - on>, Pool>().then([this] { crh.unbind(); }); - - // Global idle everything finished - on>().then([this] { - events.push_back("Global Idle"); - powerplant.shutdown(); - }); + on>, Pool>>().then([this] { do_step<16>("Custom Startup"); }); + on>, Pool>>().then([this] { do_step<17>("Custom Step"); }); + on>, Pool>>().then([this] { do_step<18>("Custom Step"); }); + crh = on>>>().then([this] { do_step<19>("Custom Idle"); }); + on>, Pool>>().then([this] { do_step<20>("Custom Step"); }); + on>, Pool>>().then([this] { do_step<21>("Custom Step"); }); + on>, Pool>>().then([this] { do_step<22>("Custom Step"); }); + on>, Pool>>().then([this] { crh.unbind(); }); + + // Idle testing for global + on>, Pool>>().then([this] { do_step<24>("Custom<2> Startup"); }); + on>, Pool>>().then([this] { do_step<25>("Custom<2> Step"); }); + on>, Pool>>().then([this] { do_step<26>("Custom<2> Step"); }); + crh = on>().then([this] { do_step<27>("Global Idle"); }); + on>, Pool>>().then([this] { do_step<28>("Custom<2> Step"); }); + on>, Pool>>().then([this] { do_step<29>("Custom<2> Step"); }); + on>, Pool>>().then([this] { do_step<30>("Custom<2> Step"); }); + on>, Pool>>().then([this] { powerplant.shutdown(); }); on().then([this] { emit(std::make_unique>());