[Home]

Summary:ASTERISK-29946: testsuite: timeout can't be overridden to higher values through argument
Reporter:N A (InterLinked)Labels:
Date Opened:2022-03-03 13:15:07.000-0600Date Closed:2022-03-04 06:13:16.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Tests/testsuite
Versions:18.9.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Attachments:
Description: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@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@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@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
```
Comments:By: Asterisk Team (asteriskteam) 2022-03-03 13:15:08.179-0600

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Joshua C. Colp (jcolp) 2022-03-03 13:25:06.824-0600

The timeout option is not for controlling the reactor timeout. It merely is a timeout for if nothing is output within the given timeout. Controlling the reactor timeout is not currently supported, and should be a separate option.