From 7fa105b9e8154086d2e21fd5c179f43db137f6f2 Mon Sep 17 00:00:00 2001 From: Milan Klanjsek Date: Wed, 3 Jan 2018 15:52:42 -0700 Subject: [PATCH] Reduce default timeout in tests, but allow much longer for deploy/delete - Also, reduce default polling interval to reduce noise in output. Signed-off-by: Jesse Alford --- tests/acceptance_test.go | 5 +++-- tests/tests_suite_test.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/acceptance_test.go b/tests/acceptance_test.go index a3bd196e..90d2102a 100644 --- a/tests/acceptance_test.go +++ b/tests/acceptance_test.go @@ -8,6 +8,7 @@ import ( "os/exec" "strconv" "strings" + "time" "github.com/jtarchie/syslog/pkg/log" . "github.com/onsi/ginkgo" @@ -41,7 +42,7 @@ var _ = Describe("Forwarding loglines to a TCP syslog drain", func() { Deploy := func(manifest string) *gexec.Session { session := BoshCmd("deploy", manifest, "-v", fmt.Sprintf("deployment=%s", DeploymentName())) - Eventually(session).Should(gexec.Exit(0)) + Eventually(session, 10*time.Minute).Should(gexec.Exit(0)) return session } @@ -67,7 +68,7 @@ var _ = Describe("Forwarding loglines to a TCP syslog drain", func() { Cleanup := func() { session := BoshCmd("delete-deployment") - Eventually(session).Should(gexec.Exit(0)) + Eventually(session, 10*time.Minute).Should(gexec.Exit(0)) } TestSharedBehavior := func() { diff --git a/tests/tests_suite_test.go b/tests/tests_suite_test.go index c99812a2..778e0e60 100644 --- a/tests/tests_suite_test.go +++ b/tests/tests_suite_test.go @@ -15,8 +15,8 @@ func TestTests(t *testing.T) { } var _ = BeforeEach(func() { - SetDefaultEventuallyTimeout(5 * time.Minute) - SetDefaultEventuallyPollingInterval(time.Second) + SetDefaultEventuallyTimeout(3 * time.Minute) + SetDefaultEventuallyPollingInterval(5 * time.Second) SetDefaultConsistentlyDuration(time.Minute) SetDefaultConsistentlyPollingInterval(time.Second) })