You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we create some resources, but have issues cleaning them up properly. This is due to different idea of different creates we use for testing.
Test dependencies are:
rstest – For parametrized tests
test-context – For managing test state
However, rstest and test-context conflict. Also see: la10736/rstest#94
Resources are:
WebDriver instance
Applications and devices created using drg
Applications and devices created using the API
Some of the resources are managed async, and need to be cleaned up async. Some of them are managed sync.
Cleaning up via Drop would be ok, but Drop is tricky to use with async. But this is how we currently clean up the WebDriver, to ensure that it is freed.
One way to deal with this could be to create some kind of Resource<T> wrapper, which you can explicitly drop/destroy. But which is also registered with the test context, to schedule cleanup for the end of the test. When using the test-context crate, this could automatically be cleaned up (async). However, when using rstest based tests, this doesn't work.
Ideally, we would find a way to combine rstest and test-context.
The text was updated successfully, but these errors were encountered:
Currently we create some resources, but have issues cleaning them up properly. This is due to different idea of different creates we use for testing.
Test dependencies are:
rstest
– For parametrized teststest-context
– For managing test stateHowever,
rstest
andtest-context
conflict. Also see: la10736/rstest#94Resources are:
drg
Some of the resources are managed async, and need to be cleaned up async. Some of them are managed sync.
Cleaning up via Drop would be ok, but Drop is tricky to use with async. But this is how we currently clean up the WebDriver, to ensure that it is freed.
One way to deal with this could be to create some kind of
Resource<T>
wrapper, which you can explicitly drop/destroy. But which is also registered with the test context, to schedule cleanup for the end of the test. When using thetest-context
crate, this could automatically be cleaned up (async). However, when usingrstest
based tests, this doesn't work.Ideally, we would find a way to combine
rstest
andtest-context
.The text was updated successfully, but these errors were encountered: