Changing how execution parallelism is handled, so that different
executors can implement their own idea of parallelism.
This commit is contained in:
@@ -15,7 +15,7 @@ namespace fs = std::filesystem;
|
||||
#ifdef DAGGY_ENABLE_SLURM
|
||||
|
||||
TEST_CASE("slurm_execution", "[slurm_executor]") {
|
||||
daggy::executors::task::SlurmTaskExecutor ex(10);
|
||||
daggy::executors::task::SlurmTaskExecutor ex;
|
||||
|
||||
daggy::ConfigValues defaultJobValues{
|
||||
{"minCPUs", "1"},
|
||||
@@ -37,7 +37,8 @@ TEST_CASE("slurm_execution", "[slurm_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);
|
||||
@@ -49,7 +50,8 @@ TEST_CASE("slurm_execution", "[slurm_executor]") {
|
||||
{"command", daggy::executors::task::SlurmTaskExecutor::Command{"/usr/bin/expr", "1", "+", "+"}}}};
|
||||
task.job.merge(defaultJobValues);
|
||||
|
||||
auto rec = ex.execute("command", task);
|
||||
auto recFuture = ex.execute("command", task);
|
||||
auto rec = recFuture.get();
|
||||
|
||||
REQUIRE(rec.rc != 0);
|
||||
REQUIRE(rec.errorLog.size() >= 20);
|
||||
@@ -68,7 +70,8 @@ TEST_CASE("slurm_execution", "[slurm_executor]") {
|
||||
{"command", daggy::executors::task::SlurmTaskExecutor::Command{"/usr/bin/cat", bigFile}}}};
|
||||
task.job.merge(defaultJobValues);
|
||||
|
||||
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));
|
||||
|
||||
Reference in New Issue
Block a user