Tests are still started after cancellation
See original GitHub issueI have a bunch of test suites created using testSequencedGroup
.
I run them using runTestsInAssemblyWithCancel
and expect that after the cancellation token is cancelled all the pending groups don’t even start. But it is not what happens, all tests in the project are attempted. afterRunTests
is executed immediately after I press Ctrl-C.
Here is an excerpt from my main
function:
[<EntryPoint>]
let main argv =
// ...
use cts = new Threading.CancellationTokenSource()
Console.CancelKeyPress.Add <| fun arg ->
cts.Cancel()
arg.Cancel <- true
Tests.afterRunTests BrowserPool.cleanup
Tests.runTestsInAssemblyWithCancel cts.Token testConfig argv
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Got an email that a test was cancelled while sitting on ...
Got an email that a test was cancelled while sitting on zoom waiting for it to start. So today I had my first...
Read more >Test Cancellation: A College of American Pathologists Q ...
Requests for laboratory testing are canceled after a specimen has already been collected from the patient for many reasons.
Read more >Cancelled lab tests—study analyzes why
The two main reasons for test cancellation are problems with the order and preanalytical problems with the specimen. ... Nearly 52 percent of...
Read more >Testing, Cancelling Flows still triggered
Solved: Anyone else had issue where they have tested a Flow then cancelled the remaining actions but still seem to be triggered? I...
Read more >What is a Cancelled Drug Test?
A cancelled drug test is one in which the Medical Review Officer (MRO) finds a serious flaw in the testing process. It is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@haf My bad. I did not see the Console.CancelKeyPress.Add in the code. That’s what I get for waking up and reading code before coffee.
Handling control c requires different logic