[Asterisk-code-review] Testsuite: Corrected Order of Operations for RLSTest Ctor (testsuite[master])

Ashley Sanders asteriskteam at digium.com
Mon Nov 16 18:41:55 CST 2015


Hello Anonymous Coward #1000019, Matt Jordan,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/1635

to look at the new patch set (#3).

Change subject: Testsuite: Corrected Order of Operations for RLSTest Ctor
......................................................................

Testsuite: Corrected Order of Operations for RLSTest Ctor

Because of the order of operations in the initializer, it
was possible to access a class member (self.token) before it
was declared in the initializer (via
self.check_prerequisites.)

This defect was only made noticeable however, because the
condition that the prerequisites check itself was examining
was incorrect. (The condition was only checking to see if an
ami-action attribute was present in the test module's
test-config.yaml file without also considering if the
test-object declared in the test module's test-config.yaml
file was of a type that could support responding to ami
actions. So, essentially, any test module  configuration
that declared an ami-action attribute would have failed.
This is, in fact, what exposted the defect with the
initialization order for the RLSTest members.)

For more information, please refer to the Jenkins incident
(a link for which is also included in the original ASTERISK
issue for your convenience):

"https://jenkins.asterisk.org/jenkins/job/periodic-asterisk-1
3/lastSuccessfulBuild/testReport/(root)/AsteriskTestSuite/te
sts_channels_pjsip_subscriptions_rls_lists_nominal_presence_
full_state/"

ASTERISK-25556
Reported By: Ashley Sanders

Change-Id: I9c2e41d3ae56594f426cc0b23fc5ca808b856ddb
---
M tests/channels/pjsip/subscriptions/rls/rls_test.py
1 file changed, 27 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/35/1635/3
-- 
To view, visit https://gerrit.asterisk.org/1635
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9c2e41d3ae56594f426cc0b23fc5ca808b856ddb
Gerrit-PatchSet: 3
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-code-review mailing list