Changing how execution parallelism is handled, so that different
executors can implement their own idea of parallelism.
This commit is contained in:
@@ -16,7 +16,8 @@ TEST_CASE("forking_executor", "[forking_executor]") {
|
||||
|
||||
REQUIRE(ex.validateTaskParameters(task.job));
|
||||
|
||||
auto rec = ex.execute("command", task);
|
||||
auto recFuture = ex.execute("command", task);
|
||||
auto rec = recFuture.get();
|
||||
|
||||
REQUIRE(rec.rc == 0);
|
||||
REQUIRE(rec.outputLog.size() >= 6);
|
||||
@@ -27,7 +28,8 @@ TEST_CASE("forking_executor", "[forking_executor]") {
|
||||
daggy::Task task{.job{
|
||||
{"command", daggy::executors::task::ForkingTaskExecutor::Command{"/usr/bin/expr", "1", "+", "+"}}}};
|
||||
|
||||
auto rec = ex.execute("command", task);
|
||||
auto recFuture = ex.execute("command", task);
|
||||
auto rec = recFuture.get();
|
||||
|
||||
REQUIRE(rec.rc == 2);
|
||||
REQUIRE(rec.errorLog.size() >= 20);
|
||||
@@ -45,7 +47,8 @@ TEST_CASE("forking_executor", "[forking_executor]") {
|
||||
daggy::Task task{.job{
|
||||
{"command", daggy::executors::task::ForkingTaskExecutor::Command{"/usr/bin/cat", bigFile}}}};
|
||||
|
||||
auto rec = ex.execute("command", task);
|
||||
auto recFuture = ex.execute("command", task);
|
||||
auto rec = recFuture.get();
|
||||
|
||||
REQUIRE(rec.rc == 0);
|
||||
REQUIRE(rec.outputLog.size() == std::filesystem::file_size(bigFile));
|
||||
@@ -80,4 +83,4 @@ TEST_CASE("forking_executor", "[forking_executor]") {
|
||||
|
||||
REQUIRE(tasks.size() == 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user