If I run more than 64 test cases, the 65th test always hangs

So this is an odd one. I’ve been adding test cases most of today. After adding each, I would run the entire suite. I noticed today, that after adding my 65th test, the test run would just hang.

I can comment out legitimate tests such that I run only 62. Everything runs fine. Start adding tests that are complete no-ops. 63 is fine. 64 is fine. Add one more and it hangs.


Do you know where it’s hanging? Is it maxing out the CPU or waiting for something to complete?

The test run states it’s starting a test case and then hangs. If I insert a print statement to be the first call in said test and run again, nothing is printed.

If I comment other tests out, doesn’t matter what, as long as the count equals 64, everything works fine.

Disregard. Think I may have found a surprising issue based on a core dump. Sorry for the noise!

Was it Dispatch related?

BTW, other people (or at least I do) use old posts on forums like this to solve issues they’re having, so if you found a solution and it’s not extremely specific to your code, it would be nice if you shared it here so anyone else with the same issue can solve it more quickly.


Yes, it was in fact dispatch related. My tests are using gRPC. For each channel created, a blocking operation was pushed onto the queue. After 64 tests were run, we hit the problem with the hang. We re-worked the tests to share the channel instead.