diff options
author | Benny Prijono <bennylp@teluu.com> | 2008-06-27 08:51:55 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2008-06-27 08:51:55 +0000 |
commit | e33addea050701dc233267caa2648de2932d09d5 (patch) | |
tree | 9086bffbd57c5442dddeb6727b391a1766be0161 | |
parent | d4cf04bb188c599ba5236f527835e9a68eead721 (diff) |
python testing: fixed slow test performance due to expecting wrong text in mod_call.py, and exclude PUBLISH tests in runall.py
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2071 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjsip-apps/src/test-pjsua/mod_call.py | 30 | ||||
-rw-r--r-- | pjsip-apps/src/test-pjsua/runall.py | 1 |
2 files changed, 23 insertions, 8 deletions
diff --git a/pjsip-apps/src/test-pjsua/mod_call.py b/pjsip-apps/src/test-pjsua/mod_call.py index 49856689..c3bb09c0 100644 --- a/pjsip-apps/src/test-pjsua/mod_call.py +++ b/pjsip-apps/src/test-pjsua/mod_call.py @@ -11,6 +11,7 @@ cfg_file = imp.load_source("cfg_file", sys.argv[2]) # Check media flow between ua1 and ua2 def check_media(ua1, ua2): ua1.send("#") + ua1.expect("#") ua1.send("1122") ua2.expect(const.RX_DTMF + "1") ua2.expect(const.RX_DTMF + "1") @@ -70,7 +71,8 @@ def test_func(t, user_data): # Hold call by caller caller.send("H") - #caller.sync_stdout() + caller.expect("INVITE sip:") + callee.expect("INVITE sip:") caller.expect(const.MEDIA_HOLD) callee.expect(const.MEDIA_HOLD) @@ -81,9 +83,10 @@ def test_func(t, user_data): # Release hold time.sleep(0.5) caller.send("v") - #caller.sync_stdout() - callee.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold") + caller.expect("INVITE sip:") + callee.expect("INVITE sip:") caller.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold") + callee.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold") # Synchronize stdout caller.sync_stdout() @@ -99,7 +102,8 @@ def test_func(t, user_data): # Hold call by callee callee.send("H") - #callee.sync_stdout() + callee.expect("INVITE sip:") + caller.expect("INVITE sip:") caller.expect(const.MEDIA_HOLD) callee.expect(const.MEDIA_HOLD) @@ -108,17 +112,20 @@ def test_func(t, user_data): callee.sync_stdout() # Release hold - time.sleep(0.5) + time.sleep(0.1) callee.send("v") - #callee.sync_stdout() - caller.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold") + callee.expect("INVITE sip:") + caller.expect("INVITE sip:") callee.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold") + caller.expect(const.MEDIA_ACTIVE, title="waiting for media active after call hold") # Synchronize stdout caller.sync_stdout() callee.sync_stdout() # Test that media is okay + # Wait for some time for ICE negotiation + time.sleep(0.6) check_media(caller, callee) check_media(callee, caller) @@ -143,7 +150,8 @@ def test_func(t, user_data): # UPDATE (by callee) callee.send("U") - #callee.sync_stdout() + callee.expect("UPDATE sip:") + caller.expect("UPDATE sip:") caller.expect(const.MEDIA_ACTIVE, title="waiting for media active with UPDATE") callee.expect(const.MEDIA_ACTIVE, title="waiting for media active with UPDATE") @@ -164,13 +172,17 @@ def test_func(t, user_data): # no common codec between them. # In caller we only enable PCMU, in callee we only enable PCMA caller.send("Cp") + caller.expect("Enter codec") caller.send("* 0") caller.send("Cp") + caller.expect("Enter codec") caller.send("pcmu 120") callee.send("Cp") + callee.expect("Enter codec") callee.send("* 0") callee.send("Cp") + callee.expect("Enter codec") callee.send("pcma 120") # Test when UPDATE fails (by callee) @@ -187,6 +199,8 @@ def test_func(t, user_data): # Test when UPDATE fails (by caller) caller.send("U") + caller.expect("UPDATE sip:") + callee.expect("UPDATE sip:") callee.expect("SIP/2.0 488") caller.expect("SIP/2.0 488") caller.sync_stdout() diff --git a/pjsip-apps/src/test-pjsua/runall.py b/pjsip-apps/src/test-pjsua/runall.py index 5c743393..60ad9dc1 100644 --- a/pjsip-apps/src/test-pjsua/runall.py +++ b/pjsip-apps/src/test-pjsua/runall.py @@ -16,6 +16,7 @@ excluded_tests = [ "svn", "scripts-call/150_srtp_2_1", # SRTP optional 'cannot' call SRTP mandatory "scripts-call/301_ice_public_a.py", # Unreliable, proxy returns 408 sometimes "scripts-call/301_ice_public_b.py", # Doesn't work because OpenSER modifies SDP + "scripts-pres/200_publish.py", # Ok from cmdline, error from runall.py "scripts-media-playrec/100_resample_lf_8_11.py", # related to clock-rate 11 kHz problem "scripts-media-playrec/100_resample_lf_8_22.py", # related to clock-rate 22 kHz problem "scripts-media-playrec/100_resample_lf_11" # related to clock-rate 11 kHz problem |