gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r4921 - GNUnet/src/applications/testing


From: gnunet
Subject: [GNUnet-SVN] r4921 - GNUnet/src/applications/testing
Date: Sun, 3 Jun 2007 22:36:23 -0600 (MDT)

Author: grothoff
Date: 2007-06-03 22:36:23 -0600 (Sun, 03 Jun 2007)
New Revision: 4921

Modified:
   GNUnet/src/applications/testing/testing.c
Log:
more robust testing

Modified: GNUnet/src/applications/testing/testing.c
===================================================================
--- GNUnet/src/applications/testing/testing.c   2007-06-04 02:51:59 UTC (rev 
4920)
+++ GNUnet/src/applications/testing/testing.c   2007-06-04 04:36:23 UTC (rev 
4921)
@@ -191,7 +191,7 @@
      entropy! */
   if (OK != connection_wait_for_running(NULL,
                                        cfg,
-                                       5 * cronMINUTES)) {
+                                       15 * cronMINUTES)) {
     fprintf(stderr,
            "Failed to confirm daemon running!\n");
     GC_free(cfg);
@@ -268,29 +268,29 @@
                                    host);
   if ( (OK == connection_wait_for_running(NULL,
                                          cfg1,
-                                         30 * cronSECONDS) ) &&
+                                         300 * cronSECONDS) ) &&
        (OK == connection_wait_for_running(NULL,
                                          cfg2,
-                                         30 * cronSECONDS) ) ) {    
+                                         300 * cronSECONDS) ) ) {    
     sock1 = client_connection_create(NULL,
                                     cfg1);
     sock2 = client_connection_create(NULL,
                                     cfg2);
-    h1 = NULL;
-    h2 = NULL;
-    if ( (OK == gnunet_identity_get_self(sock1,
-                                        &h1)) &&
-        (OK == gnunet_identity_get_self(sock2,
-                                        &h2)) &&
-        (OK == gnunet_identity_peer_add(sock1,
-                                        h2)) &&
-        (OK == gnunet_identity_peer_add(sock2,
-                                        h1)) ) {
-      ret = - 30;
-      fprintf(stderr, 
-             _("Waiting for peers to connect"));
-      while ( (ret++ < -1) &&
-             (GNUNET_SHUTDOWN_TEST() == NO) ) {
+    ret = - 10;
+    fprintf(stderr, 
+           _("Waiting for peers to connect"));
+    while ( (ret++ < -1) &&
+           (GNUNET_SHUTDOWN_TEST() == NO) ) {
+      h1 = NULL;
+      h2 = NULL;
+      if ( (OK == gnunet_identity_get_self(sock1,
+                                          &h1)) &&
+          (OK == gnunet_identity_get_self(sock2,
+                                          &h2)) &&
+          (OK == gnunet_identity_peer_add(sock1,
+                                          h2)) &&
+          (OK == gnunet_identity_peer_add(sock2,
+                                          h1)) ) {
        fprintf(stderr, ".");
        if (YES == gnunet_identity_request_connect(sock1,
                                                   &h2->senderIdentity)) {
@@ -304,12 +304,12 @@
        }
        PTHREAD_SLEEP(2 * cronSECONDS);
       }
-      fprintf(stderr, "%s\n", ret == OK ? "!" : "?");
+      FREENONNULL(h1);
+      FREENONNULL(h2);
     }
-    FREENONNULL(h1);
-    FREENONNULL(h2);
+    fprintf(stderr, "%s\n", ret == OK ? "!" : "?");
     connection_destroy(sock1);
-    connection_destroy(sock2);
+    connection_destroy(sock2);    
   } else {
     fprintf(stderr,
            "Failed to establish connection with peers.\n");





reply via email to

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