add completion callback for overlay topology configure functions
[oweals/gnunet.git] / src / namestore / test_namestore_api_remove_not_existing_record.c
index ab9095d919d1a13f7ab57151ec0e80b136297028..973cf94e48f6e9a31592b9111075fe4b340a6582 100644 (file)
@@ -24,7 +24,7 @@
 #include "platform.h"
 #include "gnunet_common.h"
 #include "gnunet_namestore_service.h"
-#include "gnunet_testing_lib-new.h"
+#include "gnunet_testing_lib.h"
 #include "namestore.h"
 #include "gnunet_signatures.h"
 
@@ -42,7 +42,7 @@
 
 #define TEST_REMOVE_RECORD_DATA 'b'
 
-#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
+#define TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100)
 
 
 static struct GNUNET_NAMESTORE_Handle * nsh;
@@ -74,11 +74,12 @@ static void
 endbadly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   if (nsh != NULL)
-    GNUNET_NAMESTORE_disconnect (nsh, GNUNET_YES);
+    GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
   if (privkey != NULL)
     GNUNET_CRYPTO_rsa_key_free (privkey);
   privkey = NULL;
+  GNUNET_free_non_null (s_name);
   res = 1;
 }
 
@@ -101,8 +102,9 @@ end (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_CRYPTO_rsa_key_free (privkey);
   privkey = NULL;
   if (nsh != NULL)
-    GNUNET_NAMESTORE_disconnect (nsh, GNUNET_YES);
+    GNUNET_NAMESTORE_disconnect (nsh);
   nsh = NULL;
+  GNUNET_free_non_null (s_name);
 }
 
 
@@ -175,7 +177,8 @@ create_record (unsigned int count)
 
 static void
 run (void *cls,
-     const struct GNUNET_CONFIGURATION_Handle *cfg)
+     const struct GNUNET_CONFIGURATION_Handle *cfg,
+     struct GNUNET_TESTING_Peer *peer)
 {
   char *hostkey_file;
   size_t rd_ser_len;
@@ -194,7 +197,7 @@ run (void *cls,
   GNUNET_CRYPTO_rsa_key_get_public(privkey, &pubkey);
 
   /* create record */
-  s_name = "dummy.dummy.gnunet";
+  s_name = GNUNET_NAMESTORE_normalize_string ("DUMMY.dummy.gnunet");
   s_rd = create_record (RECORDS);
 
   rd_ser_len = GNUNET_NAMESTORE_records_get_size(RECORDS, s_rd);