Things mostly work, just a strange hang when executing code with forking executor

This commit is contained in:
Ian Roddis
2021-07-05 15:37:29 -03:00
parent 468993edb5
commit 9b9409d504
7 changed files with 195 additions and 107 deletions

23
tests/unit_scheduler.cpp Normal file
View 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();
}
}