gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r1062 - GNUnet/src/applications/fs/fsui


From: grothoff
Subject: [GNUnet-SVN] r1062 - GNUnet/src/applications/fs/fsui
Date: Sun, 26 Jun 2005 07:04:23 -0700 (PDT)

Author: grothoff
Date: 2005-06-26 07:04:19 -0700 (Sun, 26 Jun 2005)
New Revision: 1062

Modified:
   GNUnet/src/applications/fs/fsui/downloadtest.c
   GNUnet/src/applications/fs/fsui/fsuitest.c
   GNUnet/src/applications/fs/fsui/fsuitest2.c
   GNUnet/src/applications/fs/fsui/searchtest.c
Log:
fixing testcase

Modified: GNUnet/src/applications/fs/fsui/downloadtest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/downloadtest.c      2005-06-26 14:02:47 UTC 
(rev 1061)
+++ GNUnet/src/applications/fs/fsui/downloadtest.c      2005-06-26 14:04:19 UTC 
(rev 1062)
@@ -34,6 +34,8 @@
 
 #define CHECK(a) if (!(a)) { ok = NO; BREAK(); goto FAILURE; }
 
+static volatile int suspendRestart = 0;
+
 static int parseCommandLine(int argc,
                            char * argv[]) {
   FREENONNULL(setConfigurationString("GNUNETD",
@@ -44,7 +46,7 @@
                                     NULL));
   FREENONNULL(setConfigurationString("GNUNET",
                                     "LOGLEVEL",
-                                    "WARNING"));
+                                    "NOTHING"));
   FREENONNULL(setConfigurationString("GNUNET",
                                     "GNUNETD-CONFIG",
                                     "check.conf"));
@@ -107,14 +109,9 @@
     FSUI_startDownload(ctx,
                       0,
                       event->data.SearchResult.fi.uri,
-                      fn);
-    FSUI_stop(ctx); /* download possibly incomplete
-                      at this point, thus testing resume */
-    ctx = FSUI_start("fsuidownloadtest",
-                    YES,
-                    &eventCallback,
-                    NULL);
+                      fn);    
     FREE(fn);
+    suspendRestart = 1;
   }
 }
 
@@ -142,7 +139,7 @@
   GNUNET_ASSERT(daemon > 0);
   ok = YES;
   startCron();
-  GNUNET_ASSERT(OK == waitForGNUnetDaemonRunning(30 * cronSECONDS));
+  GNUNET_ASSERT(OK == waitForGNUnetDaemonRunning(2 * cronMINUTES));
   gnunet_util_sleep(5 * cronSECONDS); /* give apps time to start */
 
   /* ACTUAL TEST CODE */
@@ -191,6 +188,17 @@
     prog++;
     CHECK(prog < 10000);
     gnunet_util_sleep(50 * cronMILLIS);
+    if (suspendRestart > 0) {
+      suspendCron();
+      FSUI_stop(ctx); /* download possibly incomplete
+                        at this point, thus testing resume */
+      ctx = FSUI_start("fsuidownloadtest",
+                      YES,
+                      &eventCallback,
+                      NULL);
+      resumeCron();
+      suspendRestart--;
+    }
   }
   FSUI_stopSearch(ctx,
                  uri);

Modified: GNUnet/src/applications/fs/fsui/fsuitest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsuitest.c  2005-06-26 14:02:47 UTC (rev 
1061)
+++ GNUnet/src/applications/fs/fsui/fsuitest.c  2005-06-26 14:04:19 UTC (rev 
1062)
@@ -126,7 +126,7 @@
   GNUNET_ASSERT(daemon > 0);
   ok = YES;
   startCron();
-  GNUNET_ASSERT(OK == waitForGNUnetDaemonRunning(30 * cronSECONDS));
+  GNUNET_ASSERT(OK == waitForGNUnetDaemonRunning(2 * cronMINUTES));
   gnunet_util_sleep(5 * cronSECONDS); /* give apps time to start */
 
   /* ACTUAL TEST CODE */

Modified: GNUnet/src/applications/fs/fsui/fsuitest2.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsuitest2.c 2005-06-26 14:02:47 UTC (rev 
1061)
+++ GNUnet/src/applications/fs/fsui/fsuitest2.c 2005-06-26 14:04:19 UTC (rev 
1062)
@@ -40,7 +40,7 @@
                                     NULL));
   FREENONNULL(setConfigurationString("GNUNET",
                                     "LOGLEVEL",
-                                    "WARNING"));
+                                    "NOTHING"));
   FREENONNULL(setConfigurationString("GNUNET",
                                     "GNUNETD-CONFIG",
                                     "check.conf"));

Modified: GNUnet/src/applications/fs/fsui/searchtest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/searchtest.c        2005-06-26 14:02:47 UTC 
(rev 1061)
+++ GNUnet/src/applications/fs/fsui/searchtest.c        2005-06-26 14:04:19 UTC 
(rev 1062)
@@ -40,7 +40,7 @@
                                     NULL));
   FREENONNULL(setConfigurationString("GNUNET",
                                     "LOGLEVEL",
-                                    "WARNING"));
+                                    "NOTHING"));
   FREENONNULL(setConfigurationString("GNUNET",
                                     "GNUNETD-CONFIG",
                                     "check.conf"));





reply via email to

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