Skip to content

Commit

Permalink
Merge pull request #838 from gwgeorgea/is-11-Senders-outputs-exceptio…
Browse files Browse the repository at this point in the history
…ns-fix

[IS-11] Fix occasional exceptions caused by undefined variables.
  • Loading branch information
N-Nagorny authored Apr 27, 2024
2 parents 2f2a5b1 + d0bbe2b commit adae812
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions nmostesting/IS11Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ def stable_state_request(self, receiver_id, activated_receivers):
return valid, activated_receivers

def activate_reference_sender_and_receiver(self, reference_senders, format, receiver, receiver_id):
valid = False
for sender_id in reference_senders[format]:
valid, response = self.reference_is04_utils.checkCleanRequestJSON("GET", "senders/" + sender_id)
if not valid:
Expand Down
23 changes: 14 additions & 9 deletions nmostesting/suites/IS1101Test.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ def test_02_02_03_01(self, test):
return test.PASS()

def test_02_02_03_02(self, test):
"Verify that the video sender supports the minimum set of video constraints"
"Verify that the audio sender supports the minimum set of audio constraints"

sample = "^urn:x-nmos:cap:"

Expand Down Expand Up @@ -3105,6 +3105,7 @@ def test_04_03(self, test):
connection_api_senders = IS05Utils(CONFIG.IS11_REFERENCE_SENDER_CONNECTION_API_URL).get_senders()

for format in ["urn:x-nmos:format:video", "urn:x-nmos:format:audio"]:
self.reference_senders[format] = []
for sender_id in connection_api_senders:
valid, response = self.reference_is04_utils.checkCleanRequestJSON("GET", "senders/" + sender_id)
if not valid:
Expand Down Expand Up @@ -3169,9 +3170,10 @@ def test_04_03_01(self, test):
activated_receivers = response
break
try:
if (activated_receivers < len(self.receivers_with_outputs)):
if (activated_receivers < len(self.is11_utils.receivers_with_or_without_outputs)):
return test.WARNING("There are no compatible senders for {} receivers"
.format(len(self.receivers_with_outputs) - activated_receivers))
.format(len(self.is11_utils.receivers_with_or_without_outputs)
- activated_receivers))
except Exception:
return test.UNCLEAR("No activated receivers")

Expand Down Expand Up @@ -3304,9 +3306,10 @@ def test_04_03_02(self, test):
activated_receivers = response
break
try:
if (activated_receivers < len(self.receivers_with_outputs)):
if (activated_receivers < len(self.is11_utils.receivers_with_or_without_outputs)):
return test.WARNING("There are no compatible senders for {} receivers"
.format(len(self.receivers_with_outputs) - activated_receivers))
.format(len(self.is11_utils.receivers_with_or_without_outputs)
- activated_receivers))
except Exception:
return test.UNCLEAR("No activated receivers")

Expand Down Expand Up @@ -3471,9 +3474,10 @@ def test_04_04_01(self, test):
activated_receivers = response
break
try:
if (activated_receivers < len(self.receivers_without_outputs)):
if (activated_receivers < len(self.is11_utils.receivers_with_or_without_outputs)):
return test.WARNING("There are no compatible senders for {} receivers"
.format(len(self.receivers_without_outputs) - activated_receivers))
.format(len(self.is11_utils.receivers_with_or_without_outputs)
- activated_receivers))
except Exception:
return test.UNCLEAR("No activated receivers")
return test.PASS()
Expand Down Expand Up @@ -3515,9 +3519,10 @@ def test_04_04_02(self, test):
activated_receivers = response
break
try:
if (activated_receivers < len(self.receivers_without_outputs)):
if (activated_receivers < len(self.is11_utils.receivers_with_or_without_outputs)):
return test.WARNING("There are no compatible senders for {} receivers"
.format(len(self.receivers_without_outputs) - activated_receivers))
.format(len(self.is11_utils.receivers_with_or_without_outputs)
- activated_receivers))
except Exception:
return test.UNCLEAR("No activated receivers")
return test.PASS()
Expand Down
Binary file modified test_data/IS1101/valid_edid.bin
Binary file not shown.

0 comments on commit adae812

Please sign in to comment.