Conversation
The reset is currently being done in the setup_test hence it is executed for each tests even if the test is skipped. Doing the reset on the teardown let us skip the reset when it is not desired such as after a skipped test. This reduce considerably the overall time for the tests execution.
uael
suggested changes
Jul 19, 2023
| if isinstance(device, BumblePandoraDevice): | ||
| device.config.setdefault('classic_enabled', True) | ||
|
|
||
| await asyncio.gather(self.dut.reset(), self.ref.reset()) |
Contributor
There was a problem hiding this comment.
Reset on setup class isnt necessary
Contributor
Author
There was a problem hiding this comment.
If we don't have a reset on the setup_class, then if the test is skipped and there is only one test then it's gonna hang for ever on the Pandora apk shutdown. Maybe we can do the reset in the teardown in the case we have only one test and it is skipped. What do you think ?
| if isinstance(device, BumblePandoraDevice): | ||
| device.config.setdefault('classic_enabled', True) | ||
|
|
||
| await asyncio.gather(self.dut.reset(), self.ref.reset()) |
| if isinstance(device, BumblePandoraDevice): | ||
| device.config.setdefault('classic_enabled', True) | ||
|
|
||
| await asyncio.gather(self.dut.reset(), self.ref.reset()) |
| if self.devices: | ||
| self.devices.stop_all() | ||
|
|
||
| @avatar.asynchronous |
Contributor
There was a problem hiding this comment.
Can you remove the reset on setup_class as well ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The reset is currently being done in the setup_test
hence it is executed for each tests even if the test is skipped.
Doing the reset on the teardown let us skip the reset when it is
not desired such as after a skipped test.
This reduce considerably the overall time for the tests execution.