diff --git a/Dockerfile b/Dockerfile index a9b9e02..996bfcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ FROM quay.io/cybozu/ubuntu:22.04 as runner # Even if the version of the runner is out of date, it will self-update at job execution time. So there is no problem to update it when you notice. # TODO: Until https://github.com/cybozu-go/meows/issues/137 is fixed, update it manually. -ARG RUNNER_VERSION=2.304.0 +ARG RUNNER_VERSION=2.313.0 ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -y \ diff --git a/kindtest/runner_test.go b/kindtest/runner_test.go index 3051bea..19517c6 100644 --- a/kindtest/runner_test.go +++ b/kindtest/runner_test.go @@ -113,15 +113,18 @@ func testRunner() { finishedAt := time.Now() By("checking status") - Expect(status).To(PointTo(MatchAllFields(Fields{ - "State": Equal("debugging"), - "Result": Equal("failure"), - "FinishedAt": PointTo(BeTemporally("~", finishedAt, 3*time.Second)), - "DeletionTime": BeNil(), - "Extend": PointTo(BeTrue()), - "JobInfo": Not(BeNil()), - "SlackChannel": BeEmpty(), - }))) + Eventually(func(g Gomega) { + _, status = waitJobCompletion(repoRunner1NS, repoRunnerPool1Name) + g.Expect(status).To(PointTo(MatchAllFields(Fields{ + "State": Equal("debugging"), + "Result": Equal("failure"), + "FinishedAt": PointTo(BeTemporally("~", finishedAt, 3*time.Second)), + "DeletionTime": Not(BeNil()), + "Extend": PointTo(BeTrue()), + "JobInfo": Not(BeNil()), + "SlackChannel": BeEmpty(), + }))) + }).Should(Succeed()) By("checking pdb") _, stderr, err := kubectl("evict", "-n", repoRunner1NS, assignedPod.Name) @@ -150,15 +153,18 @@ func testRunner() { finishedAt := time.Now() By("checking status") - Expect(status).To(PointTo(MatchAllFields(Fields{ - "State": Equal("debugging"), - "Result": Equal("failure"), - "FinishedAt": PointTo(BeTemporally("~", finishedAt, 3*time.Second)), - "DeletionTime": BeNil(), - "Extend": PointTo(BeTrue()), - "JobInfo": Not(BeNil()), - "SlackChannel": BeEmpty(), - }))) + Eventually(func(g Gomega) { + _, status = waitJobCompletion(repoRunner2NS, repoRunnerPool2Name) + g.Expect(status).To(PointTo(MatchAllFields(Fields{ + "State": Equal("debugging"), + "Result": Equal("failure"), + "FinishedAt": PointTo(BeTemporally("~", finishedAt, 3*time.Second)), + "DeletionTime": Not(BeNil()), + "Extend": PointTo(BeTrue()), + "JobInfo": Not(BeNil()), + "SlackChannel": BeEmpty(), + }))) + }).Should(Succeed()) By("sending request to the pod") extendTo := time.Now().Add(45 * time.Second).Truncate(time.Second)