Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix some tesh after changing dependence relation about Semaphore
[simgrid.git] / teshsuite / s4u / activity-lifecycle / testing_comm.cpp
index 7884ce3d474fd6b2ae245b0ca730a41f33879048..f00b25bbd853da7f71ece9f0dd1769047adc5dfe 100644 (file)
@@ -1,9 +1,9 @@
-/* Copyright (c) 2010-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "catch_simgrid.hpp"
+#include "teshsuite/catch_simgrid.hpp"
 #include <array>
 
 static void test_link_off_helper(double delay)
@@ -172,7 +172,7 @@ TEST_CASE("Activity lifecycle: comm activities")
     simgrid::s4u::this_actor::sleep_for(2);
     receiver_basic(recv_done, true, 1);
 
-    // Sleep long enough to let the test ends by itself. 1 + surf_precision should be enough.
+    // Sleep long enough to let the test ends by itself. 1 + precision_timing should be enough.
     simgrid::s4u::this_actor::sleep_for(4);
     INFO("Sender or receiver killed somehow. It shouldn't");
     REQUIRE(dsend_done);
@@ -191,7 +191,7 @@ TEST_CASE("Activity lifecycle: comm activities")
     simgrid::s4u::this_actor::sleep_for(2);
     sender_dtach(dsend_done, true, 0);
 
-    // Sleep long enough to let the test ends by itself. 3 + surf_precision should be enough.
+    // Sleep long enough to let the test ends by itself. 3 + precision_timing should be enough.
     simgrid::s4u::this_actor::sleep_for(4);
     INFO("Sender or receiver killed somehow. It shouldn't");
     REQUIRE(dsend_done);
@@ -219,7 +219,7 @@ TEST_CASE("Activity lifecycle: comm activities")
 
     simgrid::s4u::this_actor::sleep_for(2);
     sender->kill();
-    // let the test ends by itself. waiting for surf_precision should be enough.
+    // let the test ends by itself. waiting for precision_timing should be enough.
     simgrid::s4u::this_actor::sleep_for(0.00001);
 
     INFO("Sender was not killed properly or receiver killed somehow. It shouldn't");
@@ -312,9 +312,9 @@ TEST_CASE("Activity lifecycle: comm activities")
     simgrid::s4u::ActorPtr receiver = simgrid::s4u::Actor::create("receiver", all_hosts[1], []() {
       assert_exit(true, 2);
       int* data;
-      simgrid::s4u::CommPtr comm                       = simgrid::s4u::Mailbox::by_name("mb")->get_async<int>(&data);
-      std::vector<simgrid::s4u::CommPtr> pending_comms = {comm};
-      REQUIRE_NETWORK_FAILURE(simgrid::s4u::Comm::wait_any(pending_comms));
+      simgrid::s4u::CommPtr comm = simgrid::s4u::Mailbox::by_name("mb")->get_async<int>(&data);
+      simgrid::s4u::ActivitySet pending_comms({comm});
+      REQUIRE_NETWORK_FAILURE(pending_comms.wait_any());
     });
 
     simgrid::s4u::ActorPtr sender = simgrid::s4u::Actor::create("sender", all_hosts[2], []() {