commit c425097f2fd148ad8abb87b61bd0b36ff6b9bac2
parent 78f8e587b93308c7ca1df8d0a17d4247b043c63d
Author: Florian Dold <florian.dold@gmail.com>
Date: Mon, 22 Jul 2013 12:12:24 +0000
- test for correct uncommited set op destruction
Diffstat:
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/set/test_set_api.c b/src/set/test_set_api.c
@@ -173,6 +173,8 @@ run (void *cls,
struct GNUNET_TESTING_Peer *peer)
{
+ struct GNUNET_SET_OperationHandle *my_oh;
+
config = cfg;
GNUNET_CRYPTO_get_host_identity (cfg, &local_id);
printf ("my id (from CRYPTO): %s\n", GNUNET_h2s (&local_id.hashPubKey));
@@ -181,6 +183,14 @@ run (void *cls,
set1 = GNUNET_SET_create (cfg, GNUNET_SET_OPERATION_UNION);
set2 = GNUNET_SET_create (cfg, GNUNET_SET_OPERATION_UNION);
GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &app_id);
+
+ /* test if canceling an uncommited request works! */
+ my_oh = GNUNET_SET_prepare (&local_id, &app_id, NULL, 0,
+ GNUNET_SET_RESULT_ADDED, NULL, NULL);
+
+ GNUNET_SET_operation_cancel (my_oh);
+
+ /* test the real set reconciliation */
init_set1 ();
}