Things mostly work, just a strange hang when executing code with forking executor
This commit is contained in:
23
tests/unit_scheduler.cpp
Normal file
23
tests/unit_scheduler.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <iostream>
|
||||
#include <filesystem>
|
||||
|
||||
#include "daggy/executors/ForkingExecutor.hpp"
|
||||
#include "daggy/Scheduler.hpp"
|
||||
|
||||
#include "catch.hpp"
|
||||
|
||||
TEST_CASE("Basic Scheduler Execution", "[scheduler]") {
|
||||
daggy::executor::ForkingExecutor ex;
|
||||
daggy::Scheduler sched(ex);
|
||||
|
||||
std::vector<daggy::Task> tasks {
|
||||
daggy::Task{ "task_a", { "/usr/bin/echo", "task_a"}, 3, 30, { "task_c"} }
|
||||
, daggy::Task{ "task_b", { "/usr/bin/echo", "task_b"}, 3, 30, { "task_c" } }
|
||||
, daggy::Task{ "task_c", { "/usr/bin/echo", "task_c"}, 3, 30, {} }
|
||||
};
|
||||
|
||||
SECTION("Simple Run") {
|
||||
sched.scheduleDAG("Simple", tasks, {});
|
||||
sched.drain();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user