Skip to content

[Harness] Ensure we do not throw an exception if we do not have tasks. - #8272

Merged
mandel-macaque merged 2 commits into
masterfrom
donot-throw-calling-first
Apr 3, 2020
Merged

[Harness] Ensure we do not throw an exception if we do not have tasks.#8272
mandel-macaque merged 2 commits into
masterfrom
donot-throw-calling-first

Conversation

@mandel-macaque

Copy link
Copy Markdown
Contributor

The First extension will throw an exception if the list is empty. Use
FirstOrDefault, check if the devices are null and return the test as
Ignored.

fixes: #8271

The First extension will throw an exception if the list is empty. Use
FirstOrDefault, check if the devices are null and return the test as
Ignored.

fixes: #8271
@mandel-macaque mandel-macaque added the not-notes-worthy Ignore for release notes label Apr 2, 2020
@monojenkins

Copy link
Copy Markdown
Contributor

Build success
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (no change)
Test run succeeded

var devices = executingTasks.First ().Simulators;
var devices = executingTasks.FirstOrDefault ()?.Simulators;
if (devices == null) {
ExecutionResult = TestExecutingResult.Ignored;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No simulator means the test should fail with TestExecutingResult.DeviceNotFound.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rolfbjarne fixed.

@monojenkins

Copy link
Copy Markdown
Contributor

Build success
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (no change)
Test run succeeded

@mandel-macaque
mandel-macaque merged commit 3004e7d into master Apr 3, 2020
@mandel-macaque
mandel-macaque deleted the donot-throw-calling-first branch April 3, 2020 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-notes-worthy Ignore for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Harness] Harness throws an exception when there are no simulators or runtasks

5 participants