adding configure code for --enable-benchmarks, --enable-expensive-tests, some clean up
[oweals/gnunet.git] / src / datastore / test_datastore_api_management.c
index 41aa7ae3ea6aaddf785eef12c6aae95940efaca0..ca1df2cf9f36a462ac3cde5639a5c7162a4e41f8 100644 (file)
@@ -153,6 +153,14 @@ check_value (void *cls,
   struct CpsRunContext *crc = cls;
   int i;
 
+  if (NULL == key)
+    {
+      crc->phase = RP_GET_FAIL;
+      GNUNET_SCHEDULER_add_continuation (&run_continuation,
+                                        crc,
+                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
+      return;
+    }
   i = crc->i;
   GNUNET_assert (size == get_size (i));
   GNUNET_assert (0 == memcmp (data, get_data(i), size));
@@ -251,7 +259,7 @@ run_continuation (void *cls,
 #if VERBOSE
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                  "Executing `%s' number %u\n",
-                 "GET",
+                 "GET(f)",
                  crc->i);
 #endif
       GNUNET_CRYPTO_hash (&crc->i, sizeof (int), &crc->key);
@@ -357,7 +365,7 @@ check ()
                                  "-c", cfg_name, NULL);
   GNUNET_assert (NULL != proc);
   GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1,
-                      argv, "test-datastore-api", "nohelp",
+                      argv, "test-datastore-api-management", "nohelp",
                       options, &run, NULL);
   sleep (1); /* give datastore chance to process 'DROP' request */
   if (0 != GNUNET_OS_process_kill (proc, SIGTERM))
@@ -381,6 +389,7 @@ main (int argc, char *argv[])
   char *pos;
   char dir_name[128];
 
+  sleep (1);
   /* determine name of plugin to use */
   plugin_name = argv[0];
   while (NULL != (pos = strstr(plugin_name, "_")))