Refactor virtio tests #1568
Labels
Good first issue
Indicates a good issue for first-time contributors
Priority: Low
Indicates that an issue or pull request should be resolved behind issues or pull requests labelled `
Status: Parked
Indicates that an issues or pull request will be revisited later
Type: Fix
Indicates a fix to existing code
The virtio tests for block and network are using metrics to check for invalid states. The problem with using metrics in unit tests is that it makes it impossible to run the tests in parallel. The network implementation already has a
TestMutator
which can also be used to add per test counters. The same approach can be used for testing block devices.For example, instead of checking that the value of
METRICS.block.activate_fails
is one when activation fails, we could instead define anactivate_fails
counter in the test mutators, increment it on bad activate and check this value in test.This should be implemented after the
refactoring/epoll_handler
branch is merged tomaster
.The text was updated successfully, but these errors were encountered: