From fe90744ea39a7b113b9a32d159f1f5357afd86e4 Mon Sep 17 00:00:00 2001 From: Alex Collins Date: Wed, 4 Sep 2019 16:24:33 -0700 Subject: [PATCH] Improve build stability (#2247) --- .circleci/config.yml | 2 +- test/e2e/hook_test.go | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 16fd0628eb..0a8123b87f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -167,7 +167,7 @@ jobs: name: Lint code # use GOGC to limit memory usage in exchange for CPU usage, https://github.com/golangci/golangci-lint#memory-usage-of-golangci-lint # we have 8GB RAM, 2CPUs https://circleci.com/docs/2.0/executor-types/#using-machine - command: LINT_GOGC=20 LINT_CONCURRENCY=1 LINT_DEADLINE=3m0s make lint + command: LINT_GOGC=20 LINT_CONCURRENCY=1 LINT_DEADLINE=4m0s make lint - run: name: Check nothing has changed command: | diff --git a/test/e2e/hook_test.go b/test/e2e/hook_test.go index 78d9c2f313..f00371aab7 100644 --- a/test/e2e/hook_test.go +++ b/test/e2e/hook_test.go @@ -17,19 +17,19 @@ import ( func TestPreSyncHookSuccessful(t *testing.T) { // special-case that the pod remains in the running state, but we don't really care, because this is only used for // determining overall operation status is a sync with >1 wave/phase - testHookSuccessful(t, HookTypePreSync, OperationRunning) + testHookSuccessful(t, HookTypePreSync) } func TestSyncHookSuccessful(t *testing.T) { - testHookSuccessful(t, HookTypeSync, OperationSucceeded) + testHookSuccessful(t, HookTypeSync) } func TestPostSyncHookSuccessful(t *testing.T) { - testHookSuccessful(t, HookTypePostSync, OperationSucceeded) + testHookSuccessful(t, HookTypePostSync) } // make sure we can run a standard sync hook -func testHookSuccessful(t *testing.T, hookType HookType, podHookPhase OperationPhase) { +func testHookSuccessful(t *testing.T, hookType HookType) { Given(t). Path("hook"). When(). @@ -41,9 +41,7 @@ func testHookSuccessful(t *testing.T, hookType HookType, podHookPhase OperationP Expect(SyncStatusIs(SyncStatusCodeSynced)). Expect(ResourceSyncStatusIs("Pod", "pod", SyncStatusCodeSynced)). Expect(ResourceHealthIs("Pod", "pod", HealthStatusHealthy)). - Expect(Pod(func(p v1.Pod) bool { return p.Name == "hook" })). Expect(ResourceResultNumbering(2)). - Expect(ResourceResultIs(ResourceResult{Version: "v1", Kind: "Pod", Namespace: DeploymentNamespace(), Name: "pod", Status: ResultCodeSynced, Message: "pod/pod created", HookPhase: podHookPhase, SyncPhase: SyncPhaseSync})). Expect(ResourceResultIs(ResourceResult{Version: "v1", Kind: "Pod", Namespace: DeploymentNamespace(), Name: "hook", Message: "pod/hook created", HookType: hookType, HookPhase: OperationSucceeded, SyncPhase: SyncPhase(hookType)})) }