- update default values, eliminate obsolete ones
[oweals/gnunet.git] / src / testbed / test_testbed_api_controllerlink.c
index c5fae9257fc3af50ed920c3e5a7e7657f3183f33..471ab3a94c3ec0d1dd63b49d2f056e9ff4b00eb6 100644 (file)
@@ -181,7 +181,12 @@ enum Stage
   SLAVE3_LINK_SUCCESS,
 
   /**
-   * Destory master peer and mark test as success
+   * Master peer destoryed.  Destory slave 3 peer
+   */
+  MASTER_PEER_DESTROY_SUCCESS,
+
+  /**
+   * Slave 3 peer destroyed.  Mark test as success
    */
   SUCCESS,
 
@@ -541,6 +546,8 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event)
     FAIL_TEST (event->details.peer_start.peer == slave3_peer);
     GNUNET_TESTBED_operation_done (op);
     result = SLAVE3_PEER_START_SUCCESS;
+    sleep (1);
+    LOG_DEBUG ("**************************************\n");
     op = GNUNET_TESTBED_overlay_connect (mc, NULL, NULL, slave2_peer,
                                          slave3_peer);
     FAIL_TEST (NULL != op);
@@ -629,6 +636,11 @@ controller_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event)
     break;
   case SLAVE3_LINK_SUCCESS:
     check_operation_success (event);
+    result = MASTER_PEER_DESTROY_SUCCESS;
+    GNUNET_TESTBED_operation_done (op);
+    op = GNUNET_TESTBED_peer_destroy (slave3_peer);
+    break;
+  case MASTER_PEER_DESTROY_SUCCESS:
     result = SUCCESS;
     GNUNET_TESTBED_operation_done (op);
     op = NULL;