Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IS-11] Fix occasional exceptions caused by undefined variables. #838

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nmostesting/IS11Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,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 @@ -1092,7 +1092,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 @@ -3610,6 +3610,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 @@ -3674,9 +3675,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)):
Comment on lines -3677 to +3678
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace is11_utils.receivers_with_or_without_outputs with self.receivers.

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))
Comment on lines -3679 to +3681
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace is11_utils.receivers_with_or_without_outputs with self.receivers.

except Exception:
return test.UNCLEAR("No activated receivers")

Expand Down Expand Up @@ -3809,9 +3811,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)):
Comment on lines -3812 to +3814
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace is11_utils.receivers_with_or_without_outputs with self.receivers.

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))
Comment on lines -3814 to +3817
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace is11_utils.receivers_with_or_without_outputs with self.receivers.

except Exception:
return test.UNCLEAR("No activated receivers")

Expand Down Expand Up @@ -3976,9 +3979,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)):
Comment on lines -3979 to +3982
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace is11_utils.receivers_with_or_without_outputs with self.receivers.

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))
Comment on lines -3981 to +3985
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace is11_utils.receivers_with_or_without_outputs with self.receivers.

except Exception:
return test.UNCLEAR("No activated receivers")
return test.PASS()
Expand Down Expand Up @@ -4020,9 +4024,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)):
Comment on lines -4023 to +4027
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace is11_utils.receivers_with_or_without_outputs with self.receivers.

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))
Comment on lines -4025 to +4030
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace is11_utils.receivers_with_or_without_outputs with self.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.
Loading