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

Make discovery cancellable (cooperative cancellation) #4130

Open
wasabii opened this issue Nov 21, 2022 · 5 comments
Open

Make discovery cancellable (cooperative cancellation) #4130

wasabii opened this issue Nov 21, 2022 · 5 comments

Comments

@wasabii
Copy link

wasabii commented Nov 21, 2022

I've got a custom adaptor. My discovery process can take awhile (minutes). There's nothing on the DiscoverTests method I can implement, that I can find, to initiate a cancel of discovery.

As such, when I cancel it, I have to wait a couple minutes for the Test Explorer to give up. Tests keep feeding in the whole time.

Is there something about cancellation I'm missing?

@Evangelink
Copy link
Member

For discovery, there is no explicit cancellation but Test Explorer (inside of VS) used a specific API from the translation layer package we ship to cancel discovery. Using this, we are simply killing the process doing discovery so there is nothing specific a custom adapter needs to implement.

As such, when I cancel it, I have to wait a couple minutes for the Test Explorer to give up. Tests keep feeding in the whole time.

That's not a normal behavior, the discovery should kick in quite quickly.

Which version of Visual Studio are you using?

@wasabii
Copy link
Author

wasabii commented Nov 29, 2022

17.4

The issue is limited to remote tests: Windows running VS, using WSL Linux remote testing environment.

@Evangelink
Copy link
Member

I see. I think that's related to how messages are batched during remote execution not allowing us to do streamed response and so to do faster discovery cancellation (cc @drognanar).

I am afraid there is nothing we can do in short term to help there.

@wasabii
Copy link
Author

wasabii commented Nov 29, 2022

Bummer. At this point it literally takes 10 minutes to cancel.

My test adapter is a wrapper for JTreg, which ends up exposing the entire test suite of OpenJDK * TFMs. Over 30,000 tests. And WSL2 has super slow FS operations.

It takes a long time to discover them all.

@Evangelink
Copy link
Member

Let me change the title and mark this as improvement request.

@Evangelink Evangelink changed the title Slow to Abort Discovery Make discovery cancellable (cooperative cancellation) Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants