From c425097f2fd148ad8abb87b61bd0b36ff6b9bac2 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 22 Jul 2013 12:12:24 +0000 Subject: [PATCH] - test for correct uncommited set op destruction --- src/set/test_set_api.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/set/test_set_api.c b/src/set/test_set_api.c index db82b83b4..2b809c0e7 100644 --- 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 (); } -- 2.25.1