Skip to content

Commit 4175b06

Browse files
sosyzLinkinStars
authored andcommitted
perf(tests): replace panic with os.Exit in TestMain for graceful test termination
1 parent 6df436c commit 4175b06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/plugin_test/plugin_main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func TestMain(t *testing.M) {
9292
log.Info("init test database successfully")
9393

9494
if ret := t.Run(); ret != 0 {
95-
panic(ret)
95+
os.Exit(ret)
9696
}
9797
}
9898

0 commit comments

Comments
 (0)