Skip to content

Commit

Permalink
#249: location: remove relic variables in entity unregistering test
Browse files Browse the repository at this point in the history
  • Loading branch information
hobywan authored and lifflander committed Mar 10, 2019
1 parent c53fbc0 commit 17276b7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/unit/location/test_location.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ TEST_F(TestLocation, test_register_and_get_multiple_entities) {

// Every nodes to a get location on every entity
for (auto i = 0; i < nb_nodes; ++i) {
bool success= false;
bool success = false;
// The entity can be located on the node where it has been registered
vt::theLocMan()->virtual_loc->getLocation(
locat::arbitrary_entity + i, i, [i, &success, my_node](vt::NodeType node) {
Expand Down Expand Up @@ -124,12 +124,10 @@ TEST_F(TestLocation, test_unregister_multiple_entities) {
// Wait for every nodes to be registered and unregister
vt::theCollective()->barrier();

// Every nodes to a get location on every entity
for (auto i = 0; i < nb_nodes; ++i) {
bool success = false;
// The entity can be located on the node where it has been registered
vt::theLocMan()->virtual_loc->getLocation(
locat::arbitrary_entity + i, i, [i, &success, my_node](vt::NodeType node) {
locat::arbitrary_entity + i, i, [](vt::NodeType node) {
// This lambda should not be executed if the unregisterEntity works correctly
FAIL() << "entity should have been yet unregistered";
}
Expand Down Expand Up @@ -187,7 +185,7 @@ TEST_F(TestLocation, test_migrate_multiple_entities) {
auto const next_node = (my_node == nb_nodes - 1 ? 0 : my_node + 1);
auto const entity = locat::arbitrary_entity + my_node;

// Register the entity on the node 0
// register the entity on the current node
vt::theLocMan()->virtual_loc->registerEntity(entity, my_node);
vt::theCollective()->barrier();

Expand Down

0 comments on commit 17276b7

Please sign in to comment.