summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2010-08-09 07:31:34 +0000
committerNanang Izzuddin <nanang@teluu.com>2010-08-09 07:31:34 +0000
commit91d3f1cdae97c7198ca4581dad280acf8c3646b1 (patch)
tree43d274ed84712f626d5d2054eedf9d971f1e3d1e
parentff5f0ce6bf18c024c8fea500044dc68cc9dd5efe (diff)
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
-rw-r--r--tests/pjsua/mod_recvfrom.py9
1 files changed, 6 insertions, 3 deletions
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")