static void
test_cont (void *cls)
{
- h = GNUNET_PEERSTORE_connect (cfg);
GNUNET_PEERSTORE_iterate (h,
subsystem,
&pid, key,
NULL);
}
+static void
+store_cont (void *cls, int success)
+{
+ ok = success;
+ /* We need to wait a little bit to give the disconnect
+ a chance to actually finish the operation; otherwise,
+ the test may fail non-deterministically if the new
+ connection is faster than the cleanup routine of the
+ old one. */
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+ &test_cont,
+ NULL);
+}
/**
* Actually run the test.
val, strlen (val) + 1,
GNUNET_TIME_UNIT_FOREVER_ABS,
GNUNET_PEERSTORE_STOREOPTION_REPLACE,
- NULL, NULL);
- GNUNET_PEERSTORE_disconnect (h,
- GNUNET_YES);
- h = NULL;
- /* We need to wait a little bit to give the disconnect
- a chance to actually finish the operation; otherwise,
- the test may fail non-deterministically if the new
- connection is faster than the cleanup routine of the
- old one. */
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
- &test_cont,
- NULL);
+ &store_cont, NULL);
}
if (0 !=
GNUNET_TESTING_service_run ("test-gnunet-peerstore-sync",
"peerstore",
- "test_peerstore_api_data.conf",
+ "peerstore.conf",
&run, NULL))
return 1;
if (0 != ok)