Unity tests sometimes don't upload

I have a bunch of unit tests using unity. They work, they pass, life is mostly wonderful.

Occasionally, though, the tests will fail to upload. (This can occasionally happen with my normal project upload as well.) With testing, though, failures can be more sensitive. We’ve also set our suites up with the tests broken out by folder, each of which gets uploaded separately. So 1 full run might upload a dozen times.

Is this just me? is everyone elses upload 100% reliable? Should I be troubleshooting that?

If rare failures are just part of reality, how might I mitigate the upload failure. Can I auto-retry suites that fail? Can we detect the upload failure and just retry that?

I am on esp32

Actually, I have just gotten into the same problem. In my case, I had too many things connected to the same USB port. I think. Because I have tried about 5 hours of different things, until I found this post and realized it could be a hardware thing, and now it works.

So now I have disconnected everything but the ESP32 (I had lots of stuff initially, headphones, an arduino, another ESP32…), it didn’t seem to be the problem that they share the cable as I moved the cable, but rather the total USB-communication on the computer. Which is a mac.

I agree that it seems that something silently fails to upload the testing code to the MCU. Just that, for some reason. Perhaps that is in a separate memory space or something, because I could update the normal program on the MCU, which made it unlikely that it would be that. Which it was anyway.

It would be great if such failures could be detected. I seems as they are detected on the Arduino, since there I got some errors in the test upload. It added to me finding the solution.