Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Let the exception propagate naturally.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 1 Apr 2019 12:48:24 +0000 (14:48 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 1 Apr 2019 13:36:26 +0000 (15:36 +0200)
teshsuite/s4u/activity-lifecycle/activity-lifecycle.cpp

index 37b0410..4130ad9 100644 (file)
@@ -271,16 +271,10 @@ static void test_comm_dsend_and_quit_put_before_get()
 
   simgrid::s4u::Actor::create("receiver", all_hosts[2], [&recv_done]() {
     assert_exit(false, 3);
 
   simgrid::s4u::Actor::create("receiver", all_hosts[2], [&recv_done]() {
     assert_exit(false, 3);
-    bool got_exception = false;
     simgrid::s4u::this_actor::sleep_for(2);
     simgrid::s4u::this_actor::sleep_for(2);
-    try {
-      void* payload = simgrid::s4u::Mailbox::by_name("mb")->get();
-      xbt_free(payload);
-    } catch (xbt_ex const& e) {
-      got_exception = true;
-    }
+    void* payload = simgrid::s4u::Mailbox::by_name("mb")->get();
+    xbt_free(payload);
     recv_done = true;
     recv_done = true;
-    xbt_assert(not got_exception);
     return;
   });
 
     return;
   });
 
@@ -307,15 +301,9 @@ static void test_comm_dsend_and_quit_get_before_put()
 
   simgrid::s4u::Actor::create("receiver", all_hosts[2], [&recv_done]() {
     //assert_exit(false, 3);
 
   simgrid::s4u::Actor::create("receiver", all_hosts[2], [&recv_done]() {
     //assert_exit(false, 3);
-    bool got_exception = false;
-    try {
-      void* payload = simgrid::s4u::Mailbox::by_name("mb")->get();
-      xbt_free(payload);
-    } catch (xbt_ex const& e) {
-      got_exception = true;
-    }
+    void* payload = simgrid::s4u::Mailbox::by_name("mb")->get();
+    xbt_free(payload);
     recv_done = true;
     recv_done = true;
-    xbt_assert(not got_exception);
     return;
   });
 
     return;
   });