From 91d3f1cdae97c7198ca4581dad280acf8c3646b1 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Mon, 9 Aug 2010 07:31:34 +0000 Subject: Misc (re #1068): fix python self-test module 'mod_recvfrom.py': - increased message waiting timeout to 30s (was 10s) - added call_id check in retransmision detection git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3259 74dad513-b988-da41-8d7b-12977e46ad98 --- tests/pjsua/mod_recvfrom.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/pjsua/mod_recvfrom.py') diff --git a/tests/pjsua/mod_recvfrom.py b/tests/pjsua/mod_recvfrom.py index 1510aed1..5797d93c 100644 --- a/tests/pjsua/mod_recvfrom.py +++ b/tests/pjsua/mod_recvfrom.py @@ -20,6 +20,7 @@ def test_func(test): last_cseq = 0 last_method = "" + last_call_id = "" for t in cfg_file.recvfrom_cfg.transaction: # Print transaction title if t.title != "": @@ -35,18 +36,20 @@ def test_func(test): # Absorbs retransmissions cseq = 0 method = last_method - while cseq <= last_cseq and method == last_method: - request, src_addr = dlg.wait_msg_from(10) + call_id = last_call_id + while cseq <= last_cseq and method == last_method and call_id == last_call_id: + request, src_addr = dlg.wait_msg_from(30) if request==None or request=="": raise TestError("Timeout waiting for request") method = request.split(" ", 1)[0] cseq_hval = sip.get_header(request, "CSeq") cseq_hval = cseq_hval.split(" ")[0] cseq = int(cseq_hval) + call_id = sip.get_header(request, "Call-ID") last_cseq = cseq last_method = method else: - request, src_addr = dlg.wait_msg_from(10) + request, src_addr = dlg.wait_msg_from(30) if request==None or request=="": raise TestError("Timeout waiting for request") -- cgit v1.2.3