Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
csegarragonz committed Oct 15, 2021
1 parent b206a4e commit bb95f65
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test/scheduler/test_exec_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ TEST_CASE_METHOD(MpiBaseTestFixture,
faabric::scheduler::MpiWorld world;
msg.set_ismpi(true);

// Update the result for the master message
sch.setFunctionResult(msg);

// Build the message vector to reconstruct the graph
std::vector<faabric::Message> messages(worldSize);
for (int rank = 0; rank < worldSize; rank++) {
Expand All @@ -91,11 +94,6 @@ TEST_CASE_METHOD(MpiBaseTestFixture,

world.destroy();

// Update the result for the master message
sch.setFunctionResult(msg);
// Wait for the scheduler to set the result on the MPI non-master messages
SLEEP_MS(500);

// Build expected graph
ExecGraphNode nodeB1 = { .msg = messages.at(1) };
ExecGraphNode nodeB2 = { .msg = messages.at(2) };
Expand All @@ -108,6 +106,7 @@ TEST_CASE_METHOD(MpiBaseTestFixture,
ExecGraph expected{ .rootNode = nodeA };

// Check the execution graph
sch.getFunctionResult(msg.id(), 500);
ExecGraph actual = sch.getFunctionExecGraph(msg.id());
REQUIRE(countExecGraphNodes(actual) == worldSize);
REQUIRE(countExecGraphNodes(expected) == worldSize);
Expand Down

0 comments on commit bb95f65

Please sign in to comment.