summaryrefslogtreecommitdiff
path: root/pjsip-apps/src/test-pjsua
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-06-26 20:23:47 +0000
committerBenny Prijono <bennylp@teluu.com>2008-06-26 20:23:47 +0000
commitfa29e332b8c36497073e592ff45a65dad95dbba0 (patch)
tree58da69a6a896f82f4f98ec0dfd3e242ea48c685d /pjsip-apps/src/test-pjsua
parent21192d78dc4ffd64243826b72000817cdbb80aed (diff)
Added option to disable stdout buffering in pjsua, and adjust the python tests
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2067 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip-apps/src/test-pjsua')
-rw-r--r--pjsip-apps/src/test-pjsua/mod_call.py23
-rw-r--r--pjsip-apps/src/test-pjsua/run.py2
2 files changed, 12 insertions, 13 deletions
diff --git a/pjsip-apps/src/test-pjsua/mod_call.py b/pjsip-apps/src/test-pjsua/mod_call.py
index e123b3e7..49856689 100644
--- a/pjsip-apps/src/test-pjsua/mod_call.py
+++ b/pjsip-apps/src/test-pjsua/mod_call.py
@@ -36,7 +36,7 @@ def test_func(t, user_data):
caller.expect(const.STATE_CALLING)
# Callee waits for call and answers with 180/Ringing
- time.sleep(1)
+ time.sleep(0.2)
callee.expect(const.EVENT_INCOMING_CALL)
callee.send("a")
callee.send("180")
@@ -52,19 +52,19 @@ def test_func(t, user_data):
callee.send("200")
# Wait until call is connected in both endpoints
- time.sleep(1)
+ time.sleep(0.2)
caller.expect(const.STATE_CONFIRMED)
callee.expect(const.STATE_CONFIRMED)
# Synchronize stdout
caller.sync_stdout()
callee.sync_stdout()
- time.sleep(1)
+ time.sleep(0.1)
caller.sync_stdout()
callee.sync_stdout()
# Test that media is okay
- time.sleep(2)
+ time.sleep(0.3)
check_media(caller, callee)
check_media(callee, caller)
@@ -79,7 +79,7 @@ def test_func(t, user_data):
callee.sync_stdout()
# Release hold
- time.sleep(2)
+ time.sleep(0.5)
caller.send("v")
#caller.sync_stdout()
callee.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold")
@@ -108,7 +108,7 @@ def test_func(t, user_data):
callee.sync_stdout()
# Release hold
- time.sleep(2)
+ time.sleep(0.5)
callee.send("v")
#callee.sync_stdout()
caller.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold")
@@ -137,7 +137,7 @@ def test_func(t, user_data):
callee.sync_stdout()
# Test that media is okay
- time.sleep(2)
+ time.sleep(0.1)
check_media(caller, callee)
check_media(callee, caller)
@@ -152,7 +152,7 @@ def test_func(t, user_data):
callee.sync_stdout()
# Test that media is okay
- time.sleep(2)
+ time.sleep(0.1)
check_media(caller, callee)
check_media(callee, caller)
@@ -181,7 +181,7 @@ def test_func(t, user_data):
caller.sync_stdout()
# Test that media is still okay
- time.sleep(2)
+ time.sleep(0.1)
check_media(caller, callee)
check_media(callee, caller)
@@ -193,14 +193,13 @@ def test_func(t, user_data):
callee.sync_stdout()
# Test that media is still okay
- time.sleep(2)
+ time.sleep(0.1)
check_media(callee, caller)
check_media(caller, callee)
# Hangup call
- time.sleep(1)
+ time.sleep(0.1)
caller.send("h")
- caller.sync_stdout()
# Wait until calls are cleared in both endpoints
caller.expect(const.STATE_DISCONNECTED)
diff --git a/pjsip-apps/src/test-pjsua/run.py b/pjsip-apps/src/test-pjsua/run.py
index ad038882..e525bac9 100644
--- a/pjsip-apps/src/test-pjsua/run.py
+++ b/pjsip-apps/src/test-pjsua/run.py
@@ -59,7 +59,7 @@ class Expect:
self.name = inst_param.name
self.echo = inst_param.echo_enabled
self.trace_enabled = inst_param.trace_enabled
- fullcmd = G_EXE + " " + inst_param.arg + " --stdout-refresh=5 --stdout-refresh-text=" + const.STDOUT_REFRESH
+ fullcmd = G_EXE + " " + inst_param.arg + " --stdout-no-buf --stdout-refresh=5 --stdout-refresh-text=" + const.STDOUT_REFRESH
self.trace("Popen " + fullcmd)
self.proc = subprocess.Popen(fullcmd, shell=G_INUNIX, bufsize=0, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=False)
def send(self, cmd):