[asterisk-bugs] [JIRA] (ASTERISK-29946) testsuite: timeout can't be overridden to higher values through argument

N A (JIRA) noreply at issues.asterisk.org
Thu Mar 3 13:16:06 CST 2022


N A created ASTERISK-29946:
------------------------------

             Summary: testsuite: timeout can't be overridden to higher values through argument
                 Key: ASTERISK-29946
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29946
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Tests/testsuite
    Affects Versions: 18.9.0
            Reporter: N A
            Severity: Major


Overriding the reactor timeout to a HIGHER value at the command line does not work, as evidenced by the below:

Overriding to a LOWER value seems to work.

Manually changing the default in lib/python/asterisk/test_case.py to 90 and then use <= 90 as my timeout arg works just fine, and tests pass as expected.

So there is a bug with the test suite in overriding the timeout to a higher value

```
root at pbxdev:/usr/src/testsuite# ./runtests.py --test=tests/intertest/ --timeout=90
Running tests for Asterisk (run 1 of 1)...

Tests to run: 12 * 1 time(s) = 12  Maximum test inactivity time: 90 sec.
--> Running test 'tests/intertest/anoncallreject' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running tests/intertest/anoncallreject ...
[Mar 03 13:58:37] WARNING[4136555]: asterisk.test_case:550 _reactor_timeout: Reactor timeout: '30' seconds
[Mar 03 13:58:41] WARNING[4136555]: asterisk.ami:208 __check_result: Event occurred 0 times, which is out of the allowable range
[Mar 03 13:58:41] WARNING[4136555]: asterisk.ami:209 __check_result: Event description: {'count': 2, 'conditions': {'match': {'UserEvent': 'LineSuccess', 'Event': 'UserEvent'}}, 'requirements': {'match': {'Result': 'Pass'}}}
Test tests/intertest/anoncallreject failed

--> Running test 'tests/intertest/callerid' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running tests/intertest/callerid ...
[Mar 03 13:59:12] WARNING[4136674]: asterisk.test_case:550 _reactor_timeout: Reactor timeout: '30' seconds
^CTraceback (most recent call last):
  File "./runtests.py", line 1013, in <module>
    sys.exit(main() or 0)
  File "./runtests.py", line 946, in main
    test_suite.run()
  File "./runtests.py", line 666, in run
    t.run()
  File "./runtests.py", line 152, in run
    if not poll.poll(self.timeout):
KeyboardInterrupt
root at pbxdev:/usr/src/testsuite# ./runtests.py --test=tests/intertest/ --timeout=2
Running tests for Asterisk (run 1 of 1)...

Tests to run: 12 * 1 time(s) = 12  Maximum test inactivity time: 2 sec.
--> Running test 'tests/intertest/anoncallreject' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running tests/intertest/anoncallreject ...
Test tests/intertest/anoncallreject timed out

--> Running test 'tests/intertest/callerid' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running tests/intertest/callerid ...
Unhandled error in Deferred:
[Mar 03 14:00:55] CRITICAL[4136906]: twisted:154 publishToNewObserver: Unhandled error in Deferred:
Test tests/intertest/callerid timed out

--> Running test 'tests/intertest/calleridprivacy' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running tests/intertest/calleridprivacy ...
Unhandled error in Deferred:
[Mar 03 14:00:58] CRITICAL[4136999]: twisted:154 publishToNewObserver: Unhandled error in Deferred:
^CTraceback (most recent call last):
  File "./runtests.py", line 1013, in <module>
    sys.exit(main() or 0)
  File "./runtests.py", line 946, in main
    test_suite.run()
  File "./runtests.py", line 666, in run
    t.run()
  File "./runtests.py", line 168, in run
    p.wait()
  File "/usr/lib/python2.7/subprocess.py", line 1099, in wait
    pid, sts = _eintr_retry_call(os.waitpid, self.pid, 0)
  File "/usr/lib/python2.7/subprocess.py", line 125, in _eintr_retry_call
    return func(*args)
KeyboardInterrupt
root at pbxdev:/usr/src/testsuite# ./runtests.py --test=tests/intertest/ --timeout=60
Running tests for Asterisk (run 1 of 1)...

Tests to run: 12 * 1 time(s) = 12  Maximum test inactivity time: 60 sec.
--> Running test 'tests/intertest/anoncallreject' ...
Making sure Asterisk isn't running ...
Making sure SIPp isn't running...
Running tests/intertest/anoncallreject ...
[Mar 03 14:01:46] WARNING[4137093]: asterisk.test_case:550 _reactor_timeout: Reactor timeout: '30' seconds
[Mar 03 14:01:48] WARNING[4137093]: asterisk.ami:208 __check_result: Event occurred 0 times, which is out of the allowable range
[Mar 03 14:01:48] WARNING[4137093]: asterisk.ami:209 __check_result: Event description: {'count': 2, 'conditions': {'match': {'UserEvent': 'LineSuccess', 'Event': 'UserEvent'}}, 'requirements': {'match': {'Result': 'Pass'}}}
Test tests/intertest/anoncallreject failed
```



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list