From a1aedea37fd337f50b472c5ec6acfc821dd6c863 Mon Sep 17 00:00:00 2001 From: Peter Boothe Date: Tue, 19 Feb 2019 17:15:07 -0500 Subject: [PATCH 1/4] Rerun flaky tests --- .travis.yml | 27 +++++++++++++++++++++++++++ travis | 2 +- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 10901c41..d6b2c7e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,6 +68,33 @@ script: # Run all tests and gather and submit coverage information. - GCLOUD_PROJECT=mlab-testing go test -coverprofile=cover.cov ./... - $HOME/gopath/bin/goveralls -coverprofile=cover.cov -service=travis-ci +# Run the flaky test many many times. +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... +- go test ./metrics/... # Run benchmarks - go test -bench . ./geolite2/... diff --git a/travis b/travis index c4f3bafa..3eda04b2 160000 --- a/travis +++ b/travis @@ -1 +1 @@ -Subproject commit c4f3bafae45db64799080f8ebcdefd323d61ff5e +Subproject commit 3eda04b22d0d0b4ca33620f92c0ff223ebdb1c50 From fbe8474a13c94b4d78ce0e56caf1ba8ea3a6fd78 Mon Sep 17 00:00:00 2001 From: Peter Boothe Date: Tue, 19 Feb 2019 17:21:10 -0500 Subject: [PATCH 2/4] No more caching results. --- .travis.yml | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index d6b2c7e4..f679c826 100644 --- a/.travis.yml +++ b/.travis.yml @@ -69,32 +69,32 @@ script: - GCLOUD_PROJECT=mlab-testing go test -coverprofile=cover.cov ./... - $HOME/gopath/bin/goveralls -coverprofile=cover.cov -service=travis-ci # Run the flaky test many many times. -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... -- go test ./metrics/... +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 +- go test ./metrics/... -count=1 # Run benchmarks - go test -bench . ./geolite2/... From 0f74690e1f16ad6600b87acf5f0eb597bc23ffa5 Mon Sep 17 00:00:00 2001 From: Peter Boothe Date: Tue, 19 Feb 2019 18:10:35 -0500 Subject: [PATCH 3/4] Pass a real context to a shutting-down server. --- metrics/metrics_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/metrics/metrics_test.go b/metrics/metrics_test.go index 3075f199..89117b9e 100644 --- a/metrics/metrics_test.go +++ b/metrics/metrics_test.go @@ -2,6 +2,7 @@ package metrics_test import ( "bytes" + "context" "io/ioutil" "log" "net/http" @@ -13,7 +14,7 @@ import ( func TestPrometheusMetrics(t *testing.T) { server := metrics.SetupPrometheus(0) - defer server.Shutdown(nil) + defer server.Shutdown(context.Background()) log.Println(server.Addr) metricReader, err := http.Get("http://" + server.Addr + "/metrics") From 7ff31ea3547ccebfc76838ae5fb76d000db63fb8 Mon Sep 17 00:00:00 2001 From: Peter Boothe Date: Tue, 19 Feb 2019 18:18:46 -0500 Subject: [PATCH 4/4] Don't needlessly rerun tests anymore. --- .travis.yml | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/.travis.yml b/.travis.yml index f679c826..10901c41 100644 --- a/.travis.yml +++ b/.travis.yml @@ -68,33 +68,6 @@ script: # Run all tests and gather and submit coverage information. - GCLOUD_PROJECT=mlab-testing go test -coverprofile=cover.cov ./... - $HOME/gopath/bin/goveralls -coverprofile=cover.cov -service=travis-ci -# Run the flaky test many many times. -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 -- go test ./metrics/... -count=1 # Run benchmarks - go test -bench . ./geolite2/...