[svn-commits] mmichelson: testsuite/asterisk/trunk r363 - /asterisk/trunk/tests/queues/queu...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jun 7 14:35:27 CDT 2010


Author: mmichelson
Date: Mon Jun  7 14:35:24 2010
New Revision: 363

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=363
Log:
Change the sleep time for queue-baseline test.

The automated tests were failing sometimes due to not receiving
the AgentComplete event. This event is sent at the end of the call. To
ensure that this event is received, we should sleep for longer than the
duration of the call just to be on the safe side. The sleep is now
1 second longer than the call's duration.

Also added a bit of debugging so that if this test fails again, we
can see more clearly why.


Modified:
    asterisk/trunk/tests/queues/queue_baseline/test.lua

Modified: asterisk/trunk/tests/queues/queue_baseline/test.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/tests/queues/queue_baseline/test.lua?view=diff&rev=363&r1=362&r2=363
==============================================================================
--- asterisk/trunk/tests/queues/queue_baseline/test.lua (original)
+++ asterisk/trunk/tests/queues/queue_baseline/test.lua Mon Jun  7 14:35:24 2010
@@ -63,7 +63,7 @@
 	if res["Response"] ~= "Success" then
 		fail("Response failure for Originate: " .. res["Message"])
 	end
-	posix.sleep(2)
+	posix.sleep(3)
 	res, err = man:pump_messages()
 	if not res then
 		fail("Error pumping messages: " .. err)
@@ -89,6 +89,22 @@
 man(logoff)
 instance:term_or_kill()
 
+if not join then
+	print "Failed to capture Join event"
+end
+if not called then
+	print "Failed to capture AgentCalled event"
+end
+if not connect then
+	print "Failed to capture AgentConnect event"
+end
+if not leave then
+	print "Failed to capture Leave event"
+end
+if not complete then
+	print "Failed to capture AgentComplete event"
+end
+
 if not join or not called or not connect or not leave or not complete then
-	fail ("Failed to capture one of our expected events")
+	fail("Failed to capture one of our expected events")
 end




More information about the svn-commits mailing list