Author: mmichelson
Date: Tue Mar 10 14:29:07 2015
New Revision: 432718

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=432718
Log:
Add an extra expected completed query in cancellation test.

Test now passes, but I still have a FRACK from the scheduler.


Modified:
    team/group/dns/tests/test_dns_recurring.c

Modified: team/group/dns/tests/test_dns_recurring.c
URL: 
http://svnview.digium.com/svn/asterisk/team/group/dns/tests/test_dns_recurring.c?view=diff&rev=432718&r1=432717&r2=432718
==============================================================================
--- team/group/dns/tests/test_dns_recurring.c (original)
+++ team/group/dns/tests/test_dns_recurring.c Tue Mar 10 14:29:07 2015
@@ -549,7 +549,15 @@
                goto cleanup;
        }
 
-       /* Query has been canceled. Now wait to make sure there are no more 
recurring queries */
+       /* Query has been canceled. We'll be told that the query in flight has 
completed */
+       ast_mutex_lock(&rdata->lock);
+       while (!rdata->query_complete) {
+               ast_cond_wait(&rdata->cond, &rdata->lock);
+       }
+       rdata->query_complete = 0;
+       ast_mutex_unlock(&rdata->lock);
+
+       /* Now ensure that no more queries get completed after cancellation */
        clock_gettime(CLOCK_REALTIME, &timeout);
        timeout.tv_sec += 10;
 


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to