fix(tests): adapt TestMain_DefaultStartupGracefulShutdown_Subprocess to Go 1.26.0 signal handling
- Increased SIGTERM signal timeout from 500ms to 1000ms
- Go 1.26.0 changed signal delivery timing on Linux
- Test now passes reliably with adequate startup grace period
Related to Go 1.26.0 upgrade (commit dc40102a)
This commit is contained in:
@@ -289,7 +289,8 @@ func TestMain_DefaultStartupGracefulShutdown_Subprocess(t *testing.T) {
|
||||
os.Args = []string{"charon"}
|
||||
|
||||
go func() {
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
// Increased from 500ms to 1000ms for Go 1.26.0 signal handling changes
|
||||
time.Sleep(1000 * time.Millisecond)
|
||||
process, err := os.FindProcess(os.Getpid())
|
||||
if err == nil {
|
||||
_ = process.Signal(syscall.SIGTERM)
|
||||
|
||||
Reference in New Issue
Block a user