added lookup test + fix in test
[oweals/gnunet.git] / src / namestore / test_namestore_api_store.c
index 711a160d6dda367f5b6c6165ae03d35b7564b0a2..424c826b7920170da4d5f7717c8941a1e803e973 100644 (file)
@@ -102,6 +102,8 @@ put_cont (void *cls, int32_t success, const char *emsg)
              "Name store added record for `%s': %s\n",
              name,
              (success == GNUNET_OK) ? "SUCCESS" : "FAIL");
+  GNUNET_SCHEDULER_cancel (endbadly_task);
+  endbadly_task = GNUNET_SCHEDULER_NO_TASK;
   GNUNET_SCHEDULER_add_now (&end, NULL);
 }
 
@@ -153,11 +155,10 @@ main (int argc, char *argv[])
 {
   res = 1;
   if (0 !=
-      GNUNET_TESTING_service_run ("test-namestore-api",
-                                 "namestore",
-                                 "test_namestore_api.conf",
-                                 &run,
-                                 NULL))
+      GNUNET_TESTING_peer_run ("test-namestore-api",
+                               "test_namestore_api.conf",
+                               &run,
+                               NULL))
     return 1;
   return res;
 }