fixing timeouts with arm, working well now (:
authorNathan S. Evans <evans@in.tum.de>
Wed, 27 Jul 2011 16:08:39 +0000 (16:08 +0000)
committerNathan S. Evans <evans@in.tum.de>
Wed, 27 Jul 2011 16:08:39 +0000 (16:08 +0000)
src/testing/testing.c
src/testing/testing_group.c

index a9734aea68a143aa2a35d92adfd9307d45f1e8f1..e7b6c03d24cbc5f34fa65df8298ed2837e96e7c4 100644 (file)
@@ -1079,7 +1079,7 @@ GNUNET_TESTING_daemon_start_stopped_service (struct GNUNET_TESTING_Daemon *d,
   d->phase = SP_SERVICE_START;
   GNUNET_free(d->churned_services);
   d->churned_services = NULL;
-
+  d->max_timeout = GNUNET_TIME_relative_to_absolute(timeout);
   /* Check if this is a local or remote process */
   if (NULL != d->hostname)
     {
@@ -1160,7 +1160,7 @@ GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d,
 #endif
 
   d->phase = SP_SERVICE_START;
-
+  d->max_timeout = GNUNET_TIME_relative_to_absolute(timeout);
   /* Check if this is a local or remote process */
   if (NULL != d->hostname)
     {
@@ -1187,8 +1187,8 @@ GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d,
                                          "-T", GNUNET_TIME_relative_to_string(timeout),
                                          NULL);
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                  "Starting gnunet-arm with command ssh %s gnunet-arm -c %s -i %s -q\n",
-                  arg, "gnunet-arm", d->cfgfile, service);
+                  "Starting gnunet-arm with command ssh %s gnunet-arm -c %s -i %s -q -T %s\n",
+                  arg, "gnunet-arm", d->cfgfile, service, GNUNET_TIME_relative_to_string(timeout));
       GNUNET_free (arg);
     }
   else
@@ -1206,6 +1206,9 @@ GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d,
                                          "-c", d->cfgfile, "-i", service, "-q",
                                          "-T", GNUNET_TIME_relative_to_string(timeout),
                                          NULL);
+      GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                  "Starting gnunet-arm with command %s -c %s -i %s -q -T %s\n",
+                  "gnunet-arm", d->cfgfile, service, GNUNET_TIME_relative_to_string(timeout));
     }
 
   d->max_timeout = GNUNET_TIME_relative_to_absolute (timeout);
@@ -1626,7 +1629,7 @@ GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d,
     }
   d->phase = SP_SERVICE_SHUTDOWN_START;
   d->churned_services = GNUNET_strdup(service);
-
+  d->max_timeout = GNUNET_TIME_relative_to_absolute(timeout);
   /* Check if this is a local or remote process */
   if (NULL != d->hostname)
     {
index ba4b29150c2e1607847fbc3bed317ee21785fecb..0a5c286b91369aa1caf47bc75eeeb1c3de59f520 100644 (file)
@@ -6752,6 +6752,7 @@ GNUNET_TESTING_daemons_start_service (struct GNUNET_TESTING_PeerGroup *pg,
   start_ctx->cb = cb;
   start_ctx->cb_cls = cb_cls;
   start_ctx->service = GNUNET_strdup(service);
+  start_ctx->timeout = timeout;
 
   for (i = 0; i < pg->total; i++)
     {