Closed jalextowle closed 4 years ago
Thanks for the thoughtful review @agnivade! Would you mind taking a look at the other PR that I opened when you get the chance (there is no rush)?
If you'd prefer to discuss this issue elsewhere, please let me know.
Description
I noticed a problem when I was running browser tests that failed with
wasmbrowsertest
. Large amounts of Chrome instances were being spun up, which was very taxing for my CPU. After some investigation, I came to the realization that these Chrome instances were being spun up bywasmbrowsertest
and were not being torn down when a test suite failed.The root of the problem appears to be that
defer os.Exit($code)
will cause the program to exit immediately without calling the defers that were defined previously in the file. This behavior ofdefer
is described in this blogpost: https://blog.golang.org/defer-panic-and-recover.