mirror of
https://github.com/CPunch/gopenfusion.git
synced 2025-10-14 05:00:20 +00:00
fix: os.Exit() kills any deferred cleanup functions
os.Exit() itself is now also a deferred function, which will be the last to run.
This commit is contained in:
@@ -32,6 +32,7 @@ func TestMain(m *testing.M) {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// this is fine since we don't defer anything
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user