Adding a No-op task executor for testing
Fixing DFS implementation of DAG validation to be much faster Adding in additional tests to ensure the run order of expanded tasks is preserved Adding additional compile-time checks, resolving issues that came up as a result
This commit is contained in:
@@ -142,19 +142,24 @@ TEST_CASE("rest_endpoint", "[server_basic]") {
|
||||
REQUIRE(doc.IsObject());
|
||||
|
||||
REQUIRE(doc.HasMember("taskStates"));
|
||||
const auto &taskStates = doc["taskStates"].GetArray();
|
||||
REQUIRE(taskStates.Size() == 3);
|
||||
const auto &taskStates = doc["taskStates"].GetObject();
|
||||
|
||||
size_t nStates = 0;
|
||||
for (auto it = taskStates.MemberBegin(); it != taskStates.MemberEnd(); ++it) {
|
||||
nStates++;
|
||||
}
|
||||
REQUIRE(nStates == 3);
|
||||
|
||||
complete = true;
|
||||
for (size_t i = 0; i < taskStates.Size(); ++i) {
|
||||
std::string state = taskStates[i].GetString();
|
||||
for (auto it = taskStates.MemberBegin(); it != taskStates.MemberEnd(); ++it) {
|
||||
std::string state = it->value.GetString();
|
||||
if (state != "COMPLETED") {
|
||||
complete = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (complete) break;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
}
|
||||
REQUIRE(complete);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user