Code change:
Slow conformance test has caused issues like We should make runtime/image conformance test run faster without breaking the test coverage, possibly by: Shorten consistently check interval . Remove redundant test cases such as ... /cc

Related discussion:
text: Context("when running a container with invalid image", func() { It("it should run with the expected status [Conformance]", func() { testContainer := api.Container{ <del> Image:           "foo.com/foo/foo", Command:         []string{"false"}, ImagePullPolicy: api.PullIfNotPresent, </del> <ins> Image:   "foo.com/foo/foo", Command: []string{"false"}, </ins> } <del> testStatus := testStatus{"invalid-image-rpa", api.RestartPolicyAlways, api.PodPending, ContainerStateWaiting, "==", 0, false} testContainer.Name = testStatus.Name </del> <ins> testCase := testCase{"invalid-image-rpa", api.RestartPolicyAlways, api.PodPending, ContainerStateWaiting, "==", 0, false} testContainer.Name = testCase.Name </ins> invalidImageContainer := ConformanceContainer{ Container:     testContainer, Client:        cl, <del> RestartPolicy: testStatus.RestartPolicy, </del> <ins> RestartPolicy: testCase.RestartPolicy, </ins> NodeName:      *nodeName, Namespace:     namespace, } <del> err := invalidImageContainer.Create() Expect(err).NotTo(HaveOccurred()) testCContainers = append(testCContainers, invalidImageContainer) </del> <ins> Expect(invalidImageContainer.Create()).To(Succeed()) defer invalidImageContainer.Delete() </ins> <del> var status api.ContainerStatus var phase api.PodPhase </del> <ins> Eventually(invalidImageContainer.GetPhase, retryTimeout, pollInterval).Should(Equal(testCase.Phase)) Consistently(invalidImageContainer.GetPhase, consistentCheckTimeout, pollInterval).Should(Equal(testCase.Phase)) </ins> <del> Consistently(func() api.PodPhase { if status, phase, err = invalidImageContainer.GetStatus(); err != nil { return api.PodPending } else { return phase } }, consistentCheckTimeout, pollInterval).Should(Equal(testStatus.Phase)) </del> <ins> status, err := invalidImageContainer.GetStatus() </ins> Expect(err).NotTo(HaveOccurred()) By("it should get the expected 'RestartCount'") <del> Expect(status.RestartCount).To(BeNumerically(testStatus.RestartCountOper, testStatus.RestartCount)) </del> <ins> Expect(status.RestartCount).To(BeNumerically(testCase.RestartCountOper, testCase.RestartCount)) </ins> By("it should get the expected 'Ready' status") <del> Expect(status.Ready).To(Equal(testStatus.Ready)) </del> <ins> Expect(status.Ready).To(Equal(testCase.Ready)) </ins> By("it should get the expected 'State'") <del> Expect(GetContainerState(status.State) & testStatus.State).NotTo(Equal(0)) </del> <ins> Expect(GetContainerState(status.State)).To(Equal(testCase.State)) </ins> By("it should be possible to delete [Conformance]") <del> err = invalidImageContainer.Delete() Expect(err).NotTo(HaveOccurred()) Eventually(func() bool { isPresent, err := invalidImageContainer.Present() return err == nil && !isPresent }, retryTimeout, pollInterval).Should(BeTrue()) </del> <ins> Expect(invalidImageContainer.Delete()).To(Succeed()) Eventually(invalidImageContainer.Present, retryTimeout, pollInterval).Should(BeFalse()) </ins> }) }) <del> AfterEach(func() { for _, cc := range testCContainers { cc.Delete() } }) </del> }) })