gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r14371 - gnunet/src/dht


From: gnunet
Subject: [GNUnet-SVN] r14371 - gnunet/src/dht
Date: Tue, 8 Feb 2011 12:10:50 +0100

Author: nevans
Date: 2011-02-08 12:10:50 +0100 (Tue, 08 Feb 2011)
New Revision: 14371

Modified:
   gnunet/src/dht/gnunet-dht-driver.c
   gnunet/src/dht/test_dht_multipeer.c
   gnunet/src/dht/test_dht_twopeer.c
   gnunet/src/dht/test_dht_twopeer_path_tracking.c
   gnunet/src/dht/test_dht_twopeer_put_get.c
Log:
test case changes required due to testing api change

Modified: gnunet/src/dht/gnunet-dht-driver.c
===================================================================
--- gnunet/src/dht/gnunet-dht-driver.c  2011-02-08 09:34:41 UTC (rev 14370)
+++ gnunet/src/dht/gnunet-dht-driver.c  2011-02-08 11:10:50 UTC (rev 14371)
@@ -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)
 

Modified: gnunet/src/dht/test_dht_multipeer.c
===================================================================
--- gnunet/src/dht/test_dht_multipeer.c 2011-02-08 09:34:41 UTC (rev 14370)
+++ gnunet/src/dht/test_dht_multipeer.c 2011-02-08 11:10:50 UTC (rev 14371)
@@ -682,7 +682,13 @@
       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 @@
                                            &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);
 
 }
 

Modified: gnunet/src/dht/test_dht_twopeer.c
===================================================================
--- gnunet/src/dht/test_dht_twopeer.c   2011-02-08 09:34:41 UTC (rev 14370)
+++ gnunet/src/dht/test_dht_twopeer.c   2011-02-08 11:10:50 UTC (rev 14371)
@@ -318,7 +318,11 @@
 {
   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 @@
                                            &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);
 
 }

Modified: gnunet/src/dht/test_dht_twopeer_path_tracking.c
===================================================================
--- gnunet/src/dht/test_dht_twopeer_path_tracking.c     2011-02-08 09:34:41 UTC 
(rev 14370)
+++ gnunet/src/dht/test_dht_twopeer_path_tracking.c     2011-02-08 11:10:50 UTC 
(rev 14371)
@@ -410,7 +410,14 @@
       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 @@
   /* 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);
 
 }
 

Modified: gnunet/src/dht/test_dht_twopeer_put_get.c
===================================================================
--- gnunet/src/dht/test_dht_twopeer_put_get.c   2011-02-08 09:34:41 UTC (rev 
14370)
+++ gnunet/src/dht/test_dht_twopeer_put_get.c   2011-02-08 11:10:50 UTC (rev 
14371)
@@ -488,7 +488,13 @@
       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 @@
   /* 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);
 
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]