Misc (re #2504): Update pjsua test: registration test sometimes fails when the test script fails to connect fast enough to pjsua via CLI telnet (registration completed before the telnet connection established).

This commit is contained in:
Nanang Izzuddin 2020-10-24 17:24:50 +07:00
parent 004f7f7d8c
commit b1e3966f1e
1 changed files with 2 additions and 1 deletions

View File

@ -357,6 +357,7 @@ for p in script.test.process:
try:
# Wait until registration completes
if p.inst_param.have_reg:
p.send("rr")
p.expect(p.inst_param.uri+".*registration success")
# Synchronize stdout
if not p.use_telnet:
@ -380,7 +381,7 @@ if script.test.test_func != None:
# Shutdown all instances
for p in script.test.process:
# Unregister if we have_reg to make sure that next tests
# won't wail
# won't fail
if p.inst_param.have_reg:
p.send("ru")
p.expect(p.inst_param.uri+".*unregistration success")