[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 03/08: NAMESTORE: Fix existing monitoring test race condition
From: |
gnunet |
Subject: |
[gnunet] 03/08: NAMESTORE: Fix existing monitoring test race condition |
Date: |
Fri, 23 Sep 2022 06:01:07 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit d78b7864d1754f2b2c5d3c47107808dfacc68e05
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Fri Sep 23 01:05:53 2022 +0900
NAMESTORE: Fix existing monitoring test race condition
The monitoring was started too late at which point the monitor messages
may have already been sent and will never arrive
---
.../test_namestore_api_monitoring_existing.c | 38 +++++++++++-----------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/namestore/test_namestore_api_monitoring_existing.c
b/src/namestore/test_namestore_api_monitoring_existing.c
index 366f5739f..95907f34a 100644
--- a/src/namestore/test_namestore_api_monitoring_existing.c
+++ b/src/namestore/test_namestore_api_monitoring_existing.c
@@ -250,25 +250,6 @@ put_cont (void *cls,
if (3 == c)
{
- /* Start monitoring */
- zm = GNUNET_NAMESTORE_zone_monitor_start (cfg,
- &privkey,
- GNUNET_YES,
- &fail_cb,
- NULL,
- &zone_proc,
- NULL,
- &sync_cb,
- NULL);
- if (NULL == zm)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Failed to create zone monitor\n");
- GNUNET_break (0);
- res = 1;
- GNUNET_SCHEDULER_shutdown ();
- return;
- }
}
}
@@ -324,6 +305,25 @@ run (void *cls,
NULL);
return;
}
+ /* Start monitoring */
+ zm = GNUNET_NAMESTORE_zone_monitor_start (cfg,
+ &privkey,
+ GNUNET_YES,
+ &fail_cb,
+ NULL,
+ &zone_proc,
+ NULL,
+ &sync_cb,
+ NULL);
+ if (NULL == zm)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Failed to create zone monitor\n");
+ GNUNET_break (0);
+ res = 1;
+ GNUNET_SCHEDULER_shutdown ();
+ return;
+ }
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Created record 3\n");
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] branch master updated (1672c85ad -> 8ecf052b2), gnunet, 2022/09/23
- [gnunet] 03/08: NAMESTORE: Fix existing monitoring test race condition,
gnunet <=
- [gnunet] 01/08: NAMESTORE: Start transactional API, gnunet, 2022/09/23
- [gnunet] 04/08: NAMESTORE: Use a per client database connection, gnunet, 2022/09/23
- [gnunet] 06/08: NAMESTORE: Remove head based database, gnunet, 2022/09/23
- [gnunet] 07/08: NAMESTORE: Add tx API for postgres, gnunet, 2022/09/23
- [gnunet] 02/08: NAMESTORE: Remove unneeded functions and renames., gnunet, 2022/09/23
- [gnunet] 05/08: NAMESTORE: Add begin, commit and rollback API messages, gnunet, 2022/09/23
- [gnunet] 08/08: Merge branch 'dev/schanzen/namestore_transactions', gnunet, 2022/09/23