test case changes required due to testing api change
authorNathan S. Evans <evans@in.tum.de>
Tue, 8 Feb 2011 11:10:50 +0000 (11:10 +0000)
committerNathan S. Evans <evans@in.tum.de>
Tue, 8 Feb 2011 11:10:50 +0000 (11:10 +0000)
src/dht/gnunet-dht-driver.c
src/dht/test_dht_multipeer.c
src/dht/test_dht_twopeer.c
src/dht/test_dht_twopeer_path_tracking.c
src/dht/test_dht_twopeer_put_get.c

index af8812d482321d497aa5590180e2ffa1199df898..772b96d6efd2f618b497ce184b861115b41d77a3 100644 (file)
@@ -77,7 +77,7 @@
 
 #define DEFAULT_MAX_OUTSTANDING_PUTS 10
 
-#define DEFAULT_MAX_OUTSTANDING_FIND_PEERS 128
+#define DEFAULT_MAX_OUTSTANDING_FIND_PEERS 64
 
 #define DEFAULT_FIND_PEER_OFFSET GNUNET_TIME_relative_divide (DEFAULT_FIND_PEER_DELAY, DEFAULT_MAX_OUTSTANDING_FIND_PEERS)
 
index e4d1a7d204f85bd014ba51428229089707189078..626c1bc30ec5b190879011926c878fc7161414a6 100644 (file)
@@ -682,7 +682,13 @@ peers_started_callback (void *cls,
       expected_connections = -1;
       if ((pg != NULL) && (peers_left == 0))
         {
-          expected_connections = GNUNET_TESTING_connect_topology (pg, connection_topology, connect_topology_option, connect_topology_option_modifier, NULL, NULL);
+          expected_connections = GNUNET_TESTING_connect_topology (pg,
+                                                                  connection_topology,
+                                                                  connect_topology_option,
+                                                                  connect_topology_option_modifier,
+                                                                  TIMEOUT,
+                                                                  num_peers,
+                                                                  NULL, NULL);
 #if VERBOSE
           GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                       "Have %d expected connections\n", expected_connections);
@@ -870,8 +876,16 @@ run (void *cls,
                                            &end_badly, "didn't generate all hostkeys within a reasonable amount of time!!!");
 
   pg = GNUNET_TESTING_daemons_start (cfg,
-                                     peers_left, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START * num_peers), &hostkey_callback, NULL, &peers_started_callback, NULL,
-                                     &topology_callback, NULL, NULL);
+                                     peers_left,
+                                     peers_left,
+                                     GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, SECONDS_PER_PEER_START * num_peers),
+                                     &hostkey_callback,
+                                     NULL,
+                                     &peers_started_callback,
+                                     NULL,
+                                     &topology_callback,
+                                     NULL,
+                                     NULL);
 
 }
 
index aab3a1231f764d90bc1d470d019da4bfd3610b7e..e85c6101bc4ffb9c7b50f90c7e94eb6322279184 100644 (file)
@@ -318,7 +318,11 @@ connect_topology (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc)
 {
   expected_connections = -1;
   if ((pg != NULL) && (peers_left == 0))
-    expected_connections = GNUNET_TESTING_connect_topology (pg, GNUNET_TESTING_TOPOLOGY_CLIQUE, GNUNET_TESTING_TOPOLOGY_OPTION_ALL, 0.0, NULL, NULL);
+    expected_connections = GNUNET_TESTING_connect_topology (pg,
+                                                            GNUNET_TESTING_TOPOLOGY_CLIQUE,
+                                                            GNUNET_TESTING_TOPOLOGY_OPTION_ALL,
+                                                            0.0,
+                                                            TIMEOUT, 12, NULL, NULL);
 
   GNUNET_SCHEDULER_cancel (die_task);
   if (expected_connections == GNUNET_SYSERR)
@@ -409,7 +413,12 @@ run (void *cls,
                                            &end_badly, "didn't start all daemons in reasonable amount of time!!!");
 
   pg = GNUNET_TESTING_daemons_start (cfg,
-                                     num_peers, TIMEOUT, NULL, NULL, &peers_started_callback, NULL,
+                                     num_peers,
+                                     10,
+                                     TIMEOUT,
+                                     NULL, NULL,
+                                     &peers_started_callback,
+                                     NULL,
                                      &topology_callback, NULL, NULL);
 
 }
index ab4bc81e03512a2e52127a90ebd00909092a13a2..f8ce26da63e408e88cbeb5b0dc0599f2d23a300c 100644 (file)
@@ -410,7 +410,14 @@ peers_started_callback (void *cls,
       if ((pg != NULL)) /* Sanity check */
         {
           /* Connect peers in a "straight line" topology, return the number of expected connections */
-          expected_connections = GNUNET_TESTING_connect_topology (pg, GNUNET_TESTING_TOPOLOGY_LINE, GNUNET_TESTING_TOPOLOGY_OPTION_ALL, 0.0, NULL, NULL);
+          expected_connections = GNUNET_TESTING_connect_topology (pg,
+                                                                  GNUNET_TESTING_TOPOLOGY_LINE,
+                                                                  GNUNET_TESTING_TOPOLOGY_OPTION_ALL,
+                                                                  0.0,
+                                                                  TIMEOUT,
+                                                                  2,
+                                                                  NULL,
+                                                                  NULL);
         }
 
       /* Cancel current timeout fail task */
@@ -454,8 +461,16 @@ run (void *cls,
   /* Start num_peers peers, call peers_started_callback on peer start, topology_callback on peer connect */
   /* Read the API documentation for other parameters! */
   pg = GNUNET_TESTING_daemons_start (cfg,
-                                     num_peers, TIMEOUT, NULL, NULL, &peers_started_callback, NULL,
-                                     &topology_callback, NULL, NULL);
+                                     num_peers,
+                                     num_peers,
+                                     TIMEOUT,
+                                     NULL,
+                                     NULL,
+                                     &peers_started_callback,
+                                     NULL,
+                                     &topology_callback,
+                                     NULL,
+                                     NULL);
 
 }
 
index 2427edef982c71317b85aa247976ea787aadecf5..187b994794ec48b2d69ecbbef48aa3f1676e5582 100644 (file)
@@ -488,7 +488,13 @@ peers_started_callback (void *cls,
       if ((pg != NULL)) /* Sanity check */
         {
           /* Connect peers in a "straight line" topology, return the number of expected connections */
-          expected_connections = GNUNET_TESTING_connect_topology (pg, GNUNET_TESTING_TOPOLOGY_LINE, GNUNET_TESTING_TOPOLOGY_OPTION_ALL, 0.0, NULL, NULL);
+          expected_connections = GNUNET_TESTING_connect_topology (pg,
+                                                                  GNUNET_TESTING_TOPOLOGY_LINE,
+                                                                  GNUNET_TESTING_TOPOLOGY_OPTION_ALL,
+                                                                  0.0,
+                                                                  TIMEOUT,
+                                                                  12,
+                                                                  NULL, NULL);
         }
 
       /* Cancel current timeout fail task */
@@ -532,8 +538,16 @@ run (void *cls,
   /* Start num_peers peers, call peers_started_callback on peer start, topology_callback on peer connect */
   /* Read the API documentation for other parameters! */
   pg = GNUNET_TESTING_daemons_start (cfg,
-                                     num_peers, TIMEOUT, NULL, NULL, &peers_started_callback, NULL,
-                                     &topology_callback, NULL, NULL);
+                                     num_peers,
+                                     2,
+                                     TIMEOUT,
+                                     NULL,
+                                     NULL,
+                                     &peers_started_callback,
+                                     NULL,
+                                     &topology_callback,
+                                     NULL,
+                                     NULL);
 
 }