test: add test for starting/stopping lots of agents

This commit is contained in:
Frank Schroeder 2017-05-23 16:04:53 +02:00
parent dc1548af06
commit 83d9fb77b7
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 11 additions and 0 deletions

View File

@ -44,6 +44,17 @@ func externalIP() (string, error) {
return "", fmt.Errorf("Unable to find a non-loopback interface")
}
func TestAgent_MultiStartStop(t *testing.T) {
for i := 0; i < 100; i++ {
t.Run("", func(t *testing.T) {
t.Parallel()
a := NewTestAgent(t.Name(), nil)
time.Sleep(250 * time.Millisecond)
a.Shutdown()
})
}
}
func TestAgent_StartStop(t *testing.T) {
t.Parallel()
a := NewTestAgent(t.Name(), nil)