[Asterisk-code-review] res_pjsip: modify timing on NOTIFY tests (testsuite[20])
Friendly Automation
asteriskteam at digium.com
Tue Jan 31 08:11:05 CST 2023
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/testsuite/+/19840 )
Change subject: res_pjsip: modify timing on NOTIFY tests
......................................................................
res_pjsip: modify timing on NOTIFY tests
Changes in pjsip 2.13 forced small timing in NOTIFY on
SUBSCRIBE changes that were enough to cause false negatives
for tests that were ending early based on local events.
These tests have been modified to let the SIP scenario
complete before terminating.
ASTERISK-30325
Change-Id: I4cc096e4b8981ee444743cfa16b834fdd9de71f4
---
M tests/channels/pjsip/subscriptions/presence/verify_bodies/presence.py
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/driver.py
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/driver.py
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/driver.py
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/driver.py
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/driver.py
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/test-config.yaml
11 files changed, 35 insertions(+), 11 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/tests/channels/pjsip/subscriptions/presence/verify_bodies/presence.py b/tests/channels/pjsip/subscriptions/presence/verify_bodies/presence.py
index 2ef8d4f..0c8728a 100644
--- a/tests/channels/pjsip/subscriptions/presence/verify_bodies/presence.py
+++ b/tests/channels/pjsip/subscriptions/presence/verify_bodies/presence.py
@@ -417,4 +417,5 @@
"""
LOGGER.error(message)
self.test_object.set_passed(False)
- self.test_object.stop_reactor()
+ # Let the test timeout based on sipp or messages, don't stop it here in case
+ # there are any pending messages in the ether.
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/driver.py b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/driver.py
index 3aaa0d7..2d99fbe 100755
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/driver.py
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/driver.py
@@ -123,4 +123,5 @@
self.state = TERMINATED
# If we've made it here, then the test has passed!
self.test_object.set_passed(True)
- self.test_object.stop_reactor()
+ # Let the test timeout based on sipp or messages, don't stop it here in case
+ # there are any pending messages in the ether.
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/test-config.yaml
index 9391fd6..215fed2 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/test-config.yaml
@@ -46,7 +46,7 @@
typename: 'driver.TestDriver'
test-case-config:
- stop-after-scenarios: False
+ stop-after-scenarios: True
test-iterations:
-
scenarios:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/driver.py b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/driver.py
index 703306f..27b45d9 100755
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/driver.py
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/driver.py
@@ -129,4 +129,5 @@
self.state = TERMINATED
# If we've made it here, then the test has passed!
self.test_object.set_passed(True)
- self.test_object.stop_reactor()
+ # Let the test timeout based on sipp or messages, don't stop it here in case
+ # there are any pending messages in the ether.
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/test-config.yaml
index 6954384..736e767 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/test-config.yaml
@@ -40,7 +40,7 @@
typename: 'driver.TestDriver'
test-case-config:
- stop-after-scenarios: False
+ stop-after-scenarios: True
test-iterations:
-
scenarios:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/driver.py b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/driver.py
index 63d5d97..64831f0 100755
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/driver.py
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/driver.py
@@ -127,4 +127,5 @@
self.state = TERMINATED
# If we've made it here, then the test has passed!
self.test_object.set_passed(True)
- self.test_object.stop_reactor()
+ # Let the test timeout based on sipp or messages, don't stop it here in case
+ # there are any pending messages in the ether.
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/test-config.yaml
index f273987..c60dd86 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/test-config.yaml
@@ -40,7 +40,7 @@
typename: 'driver.TestDriver'
test-case-config:
- stop-after-scenarios: False
+ stop-after-scenarios: True
test-iterations:
-
scenarios:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/driver.py b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/driver.py
index 59eb832..24e9e7d 100755
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/driver.py
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/driver.py
@@ -303,7 +303,8 @@
# If we've made it here, then the test has passed!
self.test_object.set_passed(True)
- self.test_object.stop_reactor()
+ # Let the test timeout based on sipp or messages, don't stop it here in case
+ # there are any pending messages in the ether.
def transition_user(self):
""" Transitions the current user to the next user in the list.
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/test-config.yaml
index f799e60..00876a5 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/test-config.yaml
@@ -45,7 +45,7 @@
typename: 'driver.TestDriver'
test-case-config:
- stop-after-scenarios: False
+ stop-after-scenarios: True
test-iterations:
-
scenarios:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/driver.py b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/driver.py
index afb7a29..1b30e4e 100755
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/driver.py
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/driver.py
@@ -127,4 +127,5 @@
self.state = TERMINATED
# If we've made it here, then the test has passed!
self.test_object.set_passed(True)
- self.test_object.stop_reactor()
+ # Let the test timeout based on sipp or messages, don't stop it here in case
+ # there are any pending messages in the ether.
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/test-config.yaml
index 8757ae8..1c2f745 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/test-config.yaml
@@ -37,7 +37,7 @@
typename: 'driver.TestDriver'
test-case-config:
- stop-after-scenarios: False
+ stop-after-scenarios: True
test-iterations:
-
scenarios:
--
To view, visit https://gerrit.asterisk.org/c/testsuite/+/19840
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: 20
Gerrit-Change-Id: I4cc096e4b8981ee444743cfa16b834fdd9de71f4
Gerrit-Change-Number: 19840
Gerrit-PatchSet: 2
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-CC: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230131/dd145e6c/attachment-0001.html>
More information about the asterisk-code-review
mailing list