aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_testing_large_topology.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/test_testing_large_topology.c')
-rw-r--r--src/testing/test_testing_large_topology.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/testing/test_testing_large_topology.c b/src/testing/test_testing_large_topology.c
index d93f11168..46626618a 100644
--- a/src/testing/test_testing_large_topology.c
+++ b/src/testing/test_testing_large_topology.c
@@ -40,6 +40,10 @@ static float fail_percentage = 0.05;
40 40
41static int ok; 41static int ok;
42 42
43struct GNUNET_TIME_Relative connect_timeout;
44
45static unsigned long long connect_attempts;
46
43static unsigned long long num_peers; 47static unsigned long long num_peers;
44 48
45static unsigned int topology_connections; 49static unsigned int topology_connections;
@@ -775,6 +779,8 @@ connect_topology ()
775 GNUNET_TESTING_connect_topology (pg, connection_topology, 779 GNUNET_TESTING_connect_topology (pg, connection_topology,
776 connect_topology_option, 780 connect_topology_option,
777 connect_topology_option_modifier, 781 connect_topology_option_modifier,
782 connect_timeout,
783 connect_attempts,
778 &topology_creation_finished, NULL); 784 &topology_creation_finished, NULL);
779#if VERBOSE > 1 785#if VERBOSE > 1
780 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 786 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1076,6 +1082,26 @@ run (void *cls,
1076 &num_peers)) 1082 &num_peers))
1077 num_peers = DEFAULT_NUM_PEERS; 1083 num_peers = DEFAULT_NUM_PEERS;
1078 1084
1085 if (GNUNET_OK ==
1086 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "connect_timeout",
1087 &temp_settle))
1088 connect_timeout =
1089 GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, temp_settle);
1090 else
1091 {
1092 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", "testing", "connect_timeout");
1093 return;
1094 }
1095
1096
1097 if (GNUNET_OK !=
1098 GNUNET_CONFIGURATION_get_value_number (cfg, "testing", "connect_attempts",
1099 &connect_attempts))
1100 {
1101 GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n", "testing", "connect_attempts");
1102 return;
1103 }
1104
1079 main_cfg = cfg; 1105 main_cfg = cfg;
1080 1106
1081 peers_left = num_peers; 1107 peers_left = num_peers;
@@ -1104,6 +1130,7 @@ run (void *cls,
1104 GNUNET_assert (num_peers > 0 && num_peers < (unsigned int) -1); 1130 GNUNET_assert (num_peers > 0 && num_peers < (unsigned int) -1);
1105 pg = GNUNET_TESTING_daemons_start (cfg, 1131 pg = GNUNET_TESTING_daemons_start (cfg,
1106 peers_left, 1132 peers_left,
1133 peers_left / 2,
1107 timeout, 1134 timeout,
1108 &hostkey_callback, NULL, 1135 &hostkey_callback, NULL,
1109 &peers_started_callback, NULL, 1136 &peers_started_callback, NULL,