From a7c56882aff1fe8c8df9157dd88eedf292d25c02 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Thu, 19 Feb 2015 15:51:11 +0100 Subject: [PATCH] Mark slow test as such and exclude them from travis. --- Makefile | 2 +- prometheus/summary_test.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b072cfe..aee0bfa 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ example_simple: source_path dependencies examples/simple/main.go $(GO) build -o example_simple examples/simple/main.go test: build - $(GO) test ./... + $(GO) test -short ./... benchmark: build $(GO) test -benchmem -test.bench="$(BENCHMARK_FILTER)" ./... diff --git a/prometheus/summary_test.go b/prometheus/summary_test.go index 3f83796..40d05fa 100644 --- a/prometheus/summary_test.go +++ b/prometheus/summary_test.go @@ -120,6 +120,10 @@ func BenchmarkSummaryWrite8(b *testing.B) { } func TestSummaryConcurrency(t *testing.T) { + if testing.Short() { + t.Skip("Skipping test in short mode.") + } + rand.Seed(42) it := func(n uint32) bool { @@ -195,6 +199,10 @@ func TestSummaryConcurrency(t *testing.T) { } func TestSummaryVecConcurrency(t *testing.T) { + if testing.Short() { + t.Skip("Skipping test in short mode.") + } + rand.Seed(42) objectives := make([]float64, 0, len(DefObjectives))