mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 12:07:47 +00:00
Merge pull request #129047 from HirazawaUi/fix-node-e2e-incorrect-message
Fix node e2e tests incorrect error message
This commit is contained in:
commit
d516cde992
@ -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