mirror of
https://github.com/status-im/consul.git
synced 2025-02-18 00:27:04 +00:00
test: add test for starting/stopping lots of agents
This commit is contained in:
parent
7c5892a196
commit
56cf015117
@ -44,6 +44,17 @@ func externalIP() (string, error) {
|
|||||||
return "", fmt.Errorf("Unable to find a non-loopback interface")
|
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) {
|
func TestAgent_StartStop(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
a := NewTestAgent(t.Name(), nil)
|
a := NewTestAgent(t.Name(), nil)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user