From acbe62cff5fdd8f72fe24bf0ec196bf60bc1ef14 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Thu, 19 Oct 2017 14:19:42 +0200 Subject: [PATCH] Speed up volume tests by reducing pod grace period busybox based pods don't react to docker stop nicely. By reducing the pod grace period we can save ~29 seconds per volume test. --- test/e2e/framework/volume_util.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/e2e/framework/volume_util.go b/test/e2e/framework/volume_util.go index 84214a15ab4..871534ff61c 100644 --- a/test/e2e/framework/volume_util.go +++ b/test/e2e/framework/volume_util.go @@ -359,6 +359,7 @@ func VolumeTestCleanup(f *Framework, config VolumeTestConfig) { // pod. func TestVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGroup *int64, tests []VolumeTest) { By(fmt.Sprint("starting ", config.Prefix, " client")) + var gracePeriod int64 = 1 clientPod := &v1.Pod{ TypeMeta: metav1.TypeMeta{ Kind: "Pod", @@ -387,6 +388,7 @@ func TestVolumeClient(client clientset.Interface, config VolumeTestConfig, fsGro VolumeMounts: []v1.VolumeMount{}, }, }, + TerminationGracePeriodSeconds: &gracePeriod, SecurityContext: &v1.PodSecurityContext{ SELinuxOptions: &v1.SELinuxOptions{ Level: "s0:c0,c1",