mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
Fix kubelet e2e tests incorrect message
This commit is contained in:
parent
810e9e212e
commit
53e9f29d29
@ -4389,20 +4389,20 @@ var _ = SIGDescribe(nodefeature.SidecarContainers, "Containers Lifecycle", func(
|
||||
const simulToleration = 500 // milliseconds
|
||||
// should all end together since they loop infinitely and exceed their grace period
|
||||
gomega.Expect(ps1Last-ps2Last).To(gomega.BeNumerically("~", 0, simulToleration),
|
||||
fmt.Sprintf("expected PostStart 1 & PostStart 2 to be killed at the same time, got %s", results))
|
||||
fmt.Sprintf("expected PreStop 1 & PreStop 2 to be killed at the same time, got %s", results))
|
||||
gomega.Expect(ps1Last-ps3Last).To(gomega.BeNumerically("~", 0, simulToleration),
|
||||
fmt.Sprintf("expected PostStart 1 & PostStart 3 to be killed at the same time, got %s", results))
|
||||
fmt.Sprintf("expected PreStop 1 & PreStop 3 to be killed at the same time, got %s", results))
|
||||
gomega.Expect(ps2Last-ps3Last).To(gomega.BeNumerically("~", 0, simulToleration),
|
||||
fmt.Sprintf("expected PostStart 2 & PostStart 3 to be killed at the same time, got %s", results))
|
||||
fmt.Sprintf("expected PreStop 2 & PreStop 3 to be killed at the same time, got %s", results))
|
||||
|
||||
// 30 seconds + 2 second minimum grace for the SIGKILL
|
||||
const lifetimeToleration = 1000 // milliseconds
|
||||
gomega.Expect(ps1Last-ps1).To(gomega.BeNumerically("~", 32000, lifetimeToleration),
|
||||
fmt.Sprintf("expected PostStart 1 to live for ~32 seconds, got %s", results))
|
||||
fmt.Sprintf("expected PreStop 1 to live for ~32 seconds, got %s", results))
|
||||
gomega.Expect(ps2Last-ps2).To(gomega.BeNumerically("~", 32000, lifetimeToleration),
|
||||
fmt.Sprintf("expected PostStart 2 to live for ~32 seconds, got %s", results))
|
||||
fmt.Sprintf("expected PreStop 2 to live for ~32 seconds, got %s", results))
|
||||
gomega.Expect(ps3Last-ps3).To(gomega.BeNumerically("~", 32000, lifetimeToleration),
|
||||
fmt.Sprintf("expected PostStart 3 to live for ~32 seconds, got %s", results))
|
||||
fmt.Sprintf("expected PreStop 3 to live for ~32 seconds, got %s", results))
|
||||
|
||||
})
|
||||
})
|
||||
@ -4528,11 +4528,11 @@ var _ = SIGDescribe(nodefeature.SidecarContainers, "Containers Lifecycle", func(
|
||||
|
||||
const toleration = 500 // milliseconds
|
||||
gomega.Expect(ps1-ps2).To(gomega.BeNumerically("~", 0, toleration),
|
||||
fmt.Sprintf("expected PostStart 1 & PostStart 2 to start at the same time, got %s", results))
|
||||
fmt.Sprintf("expected PreStop 1 & PreStop 2 to be killed at the same time, got %s", results))
|
||||
gomega.Expect(ps1-ps3).To(gomega.BeNumerically("~", 0, toleration),
|
||||
fmt.Sprintf("expected PostStart 1 & PostStart 3 to start at the same time, got %s", results))
|
||||
fmt.Sprintf("expected PreStop 1 & PreStop 3 to be killed at the same time, got %s", results))
|
||||
gomega.Expect(ps2-ps3).To(gomega.BeNumerically("~", 0, toleration),
|
||||
fmt.Sprintf("expected PostStart 2 & PostStart 3 to start at the same time, got %s", results))
|
||||
fmt.Sprintf("expected PreStop 2 & PreStop 3 to be killed at the same time, got %s", results))
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user