Improve testing around using SIGKILL (#127)

* Add test for SIGKILL of process
* silent TestProxyManager_RunningEndpoint debug output
* Ref #125
This commit is contained in:
Benson Wong
2025-05-13 21:21:52 -07:00
committed by GitHub
parent 519c3a4d22
commit 7f37bcc6eb
6 changed files with 101 additions and 10 deletions

View File

@@ -48,14 +48,18 @@ func getSimpleResponderPath() string {
return filepath.Join("..", "build", fmt.Sprintf("simple-responder_%s_%s", goos, goarch))
}
func getTestSimpleResponderConfig(expectedMessage string) ModelConfig {
func getTestPort() int {
portMutex.Lock()
defer portMutex.Unlock()
port := nextTestPort
nextTestPort++
return getTestSimpleResponderConfigPort(expectedMessage, port)
return port
}
func getTestSimpleResponderConfig(expectedMessage string) ModelConfig {
return getTestSimpleResponderConfigPort(expectedMessage, getTestPort())
}
func getTestSimpleResponderConfigPort(expectedMessage string, port int) ModelConfig {