[asterisk-commits] espiceland: testsuite/asterisk/trunk r622 - /asterisk/trunk/tests/fastagi/han...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 28 15:22:49 CDT 2010


Author: espiceland
Date: Wed Jul 28 15:22:45 2010
New Revision: 622

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=622
Log:
Added a hack to account for a possible race condition. I will fix this the right
way later.

Modified:
    asterisk/trunk/tests/fastagi/hangup/run-test

Modified: asterisk/trunk/tests/fastagi/hangup/run-test
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/fastagi/hangup/run-test?view=diff&rev=622&r1=621&r2=622
==============================================================================
--- asterisk/trunk/tests/fastagi/hangup/run-test (original)
+++ asterisk/trunk/tests/fastagi/hangup/run-test Wed Jul 28 15:22:45 2010
@@ -9,6 +9,7 @@
 
 import sys
 import os
+import time
 from optparse import OptionParser
 from twisted.internet import reactor
 from starpy import fastagi
@@ -53,6 +54,16 @@
         self.do_test(self.agi)
 
     def finish_test(self, status):
+        print "Channel is still up! Status is", status, "Maybe the channel is still attempting to hangup..."
+        print "Testing for closed channel again."
+        time.sleep(5)
+        self.agi.channelStatus(
+                agi.variables['agi_channel']
+            ).addCallback(
+                self.finish_test2
+            ).addErrback(self.on_failure)
+
+    def finish_test2(self, status):
         print "Channel is still up! Status is", status
         self.passed = False
         self.result_changed()




More information about the asterisk-commits mailing list