[Asterisk-code-review] chan pjsip: Creating Channel Causes Asterisk to Crash When D... (testsuite[master])

Matt Jordan asteriskteam at digium.com
Tue Apr 28 06:58:49 CDT 2015


Matt Jordan has posted comments on this change.

Change subject: chan_pjsip: Creating Channel Causes Asterisk to Crash When Duplicate AOR             Sections Exist in pjsip.conf
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.asterisk.org/#/c/241/2/tests/channels/pjsip/configuration/duplicate_sections/duplicate_sections.py
File tests/channels/pjsip/configuration/duplicate_sections/duplicate_sections.py:

Line 1: #!/usr/bin/env python
      : """
      : Copyright (C) 2015, Digium, Inc.
      : Ashley Sanders <asanders at digium.com>
      : 
      : This program is free software, distributed under the terms of
      : the GNU General Public License Version 2.
      : """
      : 
      : import sys
      : 
      : sys.path.append("lib/python")
      : sys.path.append("tests/channels/pjsip/configuration")
      : 
      : from test_harness import TestHarness
      : 
      : 
      : class DuplicateSectionsTestHarness(TestHarness):
      :     """The test harness for the duplicate sections test."""
      : 
      :     def __init__(self, config, test_object):
      :         """Constructor.
      : 
      :         Keyword Arguments:
      :         config                 -- The YAML configuration for this test.
      :         test_object            -- The TestCaseModule instance for this test.
      :         """
      : 
      :         super(DuplicateSectionsTestHarness, self).__init__(config,
      :                                                            test_object)
> -- This comment was also added to your issue raised in happy_config.py --
There's actually a way to explicitly add a path (independent of the module) to the search path, which would obviate the need for this class.

See 'add-to-search-path' and 'add-relative-to-search-path', either of which should allow you to specify a path to the module to load. See also the cdr/cdr_manipulation/cdr_fork_end_time test, which makes use of one of these.

I'd prefer that over an empty class myself, particularly since Python doesn't generally have a good notion of abstract base classes.


-- 
To view, visit https://gerrit.asterisk.org/241
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I36078aae985050cff323ace3ccfd7464fe1de35f
Gerrit-PatchSet: 2
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list