fixing issue pointed out by amatus
[oweals/gnunet.git] / src / datacache / test_datacache.c
index c5acf365aa74d538481d890b2c3efe7349551cfb..da7894d6b601ac94216167dbc9d06e57854a7dd0 100644 (file)
@@ -42,7 +42,7 @@ static int
 checkIt (void *cls,
         struct GNUNET_TIME_Absolute exp,
         const GNUNET_HashCode * key,
-         uint32_t size, 
+         size_t size, 
         const char *data, 
         enum GNUNET_BLOCK_Type type)
 {
@@ -77,8 +77,12 @@ run (void *cls,
   h = GNUNET_DATACACHE_create (sched,
                               cfg,
                               "testcache");
-
-  ASSERT (NULL != h);
+  if (h == NULL)
+    {
+      fprintf (stderr,
+              "Failed to initialize datacache.  Database likely not setup, skipping test.\n");
+      return;
+    }
   exp = GNUNET_TIME_absolute_get ();
   exp.value += 5 * 60 * 1000;
   memset (&k, 0, sizeof (GNUNET_HashCode));