[Asterisk-code-review] pjsip: Fix transport reuse notify test and failure ripples. (testsuite[16])

Jenkins2 asteriskteam at digium.com
Thu Jul 26 18:18:25 CDT 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/9705 )

Change subject: pjsip: Fix transport reuse notify test and failure ripples.
......................................................................

pjsip: Fix transport reuse notify test and failure ripples.

The tests/channels/pjsip/transport/reuse/notify test exposed a
problem in the Alembic for PJSIP. The "mwi_subscribe_replaces_unsolicited"
field is an integer instead of a boolean. ASTERISK~27988 has been
created to track fixing that explicitly but in the mean time the
test configuration has been changed to use "0" to disable it.

A minor change to the realtime converter has been done so that
the database is cleaned up if anything can't be inserted into the
database. This was not previously done which caused subsequent tests
to fail due to leftover data being in the database.

Change-Id: Iad39ef71b1758bf781fbf27cbc7229e907e3b26f
---
M lib/python/asterisk/realtime_converter.py
M tests/channels/pjsip/transport/reuse/notify/configs/ast1/pjsip.conf
2 files changed, 6 insertions(+), 2 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/lib/python/asterisk/realtime_converter.py b/lib/python/asterisk/realtime_converter.py
index 95ae579..5359452 100644
--- a/lib/python/asterisk/realtime_converter.py
+++ b/lib/python/asterisk/realtime_converter.py
@@ -257,7 +257,11 @@
         for realtime_file in REALTIME_FILE_REGISTRY:
             realtime_file.write_configs(self.config_dir, test_object.ast[0])
 
-        self.write_db()
+        try:
+            self.write_db()
+        except:
+            self.cleanup(None)
+            raise
 
     def write_extconfig_conf(self):
         """Write the initial extconfig.conf information
diff --git a/tests/channels/pjsip/transport/reuse/notify/configs/ast1/pjsip.conf b/tests/channels/pjsip/transport/reuse/notify/configs/ast1/pjsip.conf
index cce5c32..e4e1673 100644
--- a/tests/channels/pjsip/transport/reuse/notify/configs/ast1/pjsip.conf
+++ b/tests/channels/pjsip/transport/reuse/notify/configs/ast1/pjsip.conf
@@ -19,7 +19,7 @@
 aors=alice
 auth=alice
 mailboxes=1000 at default
-mwi_subscribe_replaces_unsolicited=no
+mwi_subscribe_replaces_unsolicited=0
 rewrite_contact=yes
 
 [alice]

-- 
To view, visit https://gerrit.asterisk.org/9705
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: 16
Gerrit-MessageType: merged
Gerrit-Change-Id: Iad39ef71b1758bf781fbf27cbc7229e907e3b26f
Gerrit-Change-Number: 9705
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180726/da5ac2bd/attachment.html>


More information about the asterisk-code-review mailing list