Skip to content

Commit

Permalink
This made osx kernel panic... what will happen on CI!
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Nov 30, 2023
1 parent b0ce045 commit 99d3e6d
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions tests/dsl/Idle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ struct SimpleMessage {
int data;
};

constexpr int time_step = 100;
constexpr int time_step = 50;

class TestReactor : public test_util::TestBase<TestReactor, 10000> {
public:
template <int N>
struct CustomPool {
static constexpr int thread_count = 2;
};
Expand Down Expand Up @@ -75,20 +76,24 @@ class TestReactor : public test_util::TestBase<TestReactor, 10000> {
on<Trigger<Step<15>>, MainThread>().then([this] { mrh.unbind(); });

// Idle testing for custom pool
on<Trigger<Step<16>>, Pool<CustomPool>>().then([this] { do_step<16>("Custom Startup"); });
on<Trigger<Step<17>>, Pool<CustomPool>>().then([this] { do_step<17>("Custom Step"); });
on<Trigger<Step<18>>, Pool<CustomPool>>().then([this] { do_step<18>("Custom Step"); });
crh = on<Idle<Pool<CustomPool>>>().then([this] { do_step<19>("Custom Idle"); });
on<Trigger<Step<20>>, Pool<CustomPool>>().then([this] { do_step<20>("Custom Step"); });
on<Trigger<Step<21>>, Pool<CustomPool>>().then([this] { do_step<21>("Custom Step"); });
on<Trigger<Step<22>>, Pool<CustomPool>>().then([this] { do_step<22>("Custom Step"); });
on<Trigger<Step<23>>, Pool<CustomPool>>().then([this] { crh.unbind(); });

// Global idle everything finished
on<Idle<>>().then([this] {
events.push_back("Global Idle");
powerplant.shutdown();
});
on<Trigger<Step<16>>, Pool<CustomPool<1>>>().then([this] { do_step<16>("Custom Startup"); });
on<Trigger<Step<17>>, Pool<CustomPool<1>>>().then([this] { do_step<17>("Custom Step"); });
on<Trigger<Step<18>>, Pool<CustomPool<1>>>().then([this] { do_step<18>("Custom Step"); });
crh = on<Idle<Pool<CustomPool<1>>>>().then([this] { do_step<19>("Custom Idle"); });
on<Trigger<Step<20>>, Pool<CustomPool<1>>>().then([this] { do_step<20>("Custom Step"); });
on<Trigger<Step<21>>, Pool<CustomPool<1>>>().then([this] { do_step<21>("Custom Step"); });
on<Trigger<Step<22>>, Pool<CustomPool<1>>>().then([this] { do_step<22>("Custom Step"); });
on<Trigger<Step<23>>, Pool<CustomPool<1>>>().then([this] { crh.unbind(); });

// Idle testing for global
on<Trigger<Step<24>>, Pool<CustomPool<2>>>().then([this] { do_step<24>("Custom<2> Startup"); });
on<Trigger<Step<25>>, Pool<CustomPool<2>>>().then([this] { do_step<25>("Custom<2> Step"); });
on<Trigger<Step<26>>, Pool<CustomPool<2>>>().then([this] { do_step<26>("Custom<2> Step"); });
crh = on<Idle<>>().then([this] { do_step<27>("Global Idle"); });
on<Trigger<Step<28>>, Pool<CustomPool<2>>>().then([this] { do_step<28>("Custom<2> Step"); });
on<Trigger<Step<29>>, Pool<CustomPool<2>>>().then([this] { do_step<29>("Custom<2> Step"); });
on<Trigger<Step<30>>, Pool<CustomPool<2>>>().then([this] { do_step<30>("Custom<2> Step"); });
on<Trigger<Step<31>>, Pool<CustomPool<2>>>().then([this] { powerplant.shutdown(); });

on<Startup>().then([this] {
emit(std::make_unique<Step<1>>());
Expand Down

0 comments on commit 99d3e6d

Please sign in to comment.