Merge pull request #25085 from aaronlehmann/restart-delay-integration-tests
Specify a lower restart delay for swarm integration tests Upstream-commit: 5d65ba4ca7ecaaa31f13cd3052ac7c052f09e21f Component: engine
This commit is contained in:
@ -757,14 +757,18 @@ func (s *DockerSwarmSuite) TestApiSwarmForceNewCluster(c *check.C) {
|
||||
}
|
||||
|
||||
func simpleTestService(s *swarm.Service) {
|
||||
var ureplicas uint64
|
||||
ureplicas = 1
|
||||
ureplicas := uint64(1)
|
||||
restartDelay := time.Duration(100 * time.Millisecond)
|
||||
|
||||
s.Spec = swarm.ServiceSpec{
|
||||
TaskTemplate: swarm.TaskSpec{
|
||||
ContainerSpec: swarm.ContainerSpec{
|
||||
Image: "busybox:latest",
|
||||
Command: []string{"/bin/top"},
|
||||
},
|
||||
RestartPolicy: &swarm.RestartPolicy{
|
||||
Delay: &restartDelay,
|
||||
},
|
||||
},
|
||||
Mode: swarm.ServiceMode{
|
||||
Replicated: &swarm.ReplicatedService{
|
||||
@ -776,14 +780,18 @@ func simpleTestService(s *swarm.Service) {
|
||||
}
|
||||
|
||||
func serviceForUpdate(s *swarm.Service) {
|
||||
var ureplicas uint64
|
||||
ureplicas = 1
|
||||
ureplicas := uint64(1)
|
||||
restartDelay := time.Duration(100 * time.Millisecond)
|
||||
|
||||
s.Spec = swarm.ServiceSpec{
|
||||
TaskTemplate: swarm.TaskSpec{
|
||||
ContainerSpec: swarm.ContainerSpec{
|
||||
Image: "busybox:latest",
|
||||
Command: []string{"/bin/top"},
|
||||
},
|
||||
RestartPolicy: &swarm.RestartPolicy{
|
||||
Delay: &restartDelay,
|
||||
},
|
||||
},
|
||||
Mode: swarm.ServiceMode{
|
||||
Replicated: &swarm.ReplicatedService{
|
||||
@ -792,7 +800,7 @@ func serviceForUpdate(s *swarm.Service) {
|
||||
},
|
||||
UpdateConfig: &swarm.UpdateConfig{
|
||||
Parallelism: 2,
|
||||
Delay: 8 * time.Second,
|
||||
Delay: 4 * time.Second,
|
||||
FailureAction: swarm.UpdateFailureActionContinue,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user