WiP
[oweals/gnunet.git] / src / core / test_core_api_start_only.c
index bfe160edb9585ce7ab391eedf76ccc1504e3fdf8..b6ad19b7769ae4890b7ec1d257baef8dee9f0bcc 100644 (file)
@@ -31,7 +31,9 @@
 #include "gnunet_program_lib.h"
 #include "gnunet_scheduler_lib.h"
 
-#define VERBOSE GNUNET_YES
+#define VERBOSE GNUNET_NO
+
+#define TIMEOUT 3
 
 #define START_ARM GNUNET_YES
 
@@ -195,7 +197,7 @@ run (void *cls,
   OKPP;
   setup_peer (&p1, "test_core_api_peer1.conf");
   setup_peer (&p2, "test_core_api_peer2.conf");
-  timeout_task_id = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+  timeout_task_id = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, TIMEOUT),
                                                  &timeout_task,
                                                  NULL);
   p1.ch = GNUNET_CORE_connect (p1.cfg, 1,
@@ -242,6 +244,8 @@ check ()
   struct GNUNET_GETOPT_CommandLineOption options[] = {
     GNUNET_GETOPT_OPTION_END
   };
+  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1");
+  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2");
 
   ok = 1;
   GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
@@ -266,7 +270,8 @@ main (int argc, char *argv[])
 #endif
                     NULL);
   ret = check ();
-
+  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1");
+  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2");
   return ret;
 }