From a33efc3992f58355eb98d7a5574df955952924b8 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Thu, 22 Jan 2026 04:15:47 +0700 Subject: all: mark and skip the slow test The TestScan_slow takes around ~11 seconds due to test include [time.Sleep]. --- Makefile | 2 +- brokenlinks/brokenlinks_test.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0226504..ee4eb7e 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ lint: .PHONY: test test: - CGO_ENABLED=1 go test -failfast -timeout=1m -race \ + CGO_ENABLED=1 go test -failfast -timeout=1m -race -short -v \ -coverprofile=$(COVER_OUT) ./... go tool cover -html=$(COVER_OUT) -o $(COVER_HTML) diff --git a/brokenlinks/brokenlinks_test.go b/brokenlinks/brokenlinks_test.go index eedad33..f251165 100644 --- a/brokenlinks/brokenlinks_test.go +++ b/brokenlinks/brokenlinks_test.go @@ -479,6 +479,10 @@ func TestScan_pastResult(t *testing.T) { } func TestScan_slow(t *testing.T) { + if testing.Short() { + t.Skip("skipping test in short mode.") + } + const testUrl = `http://` + testAddressSlow parsedUrlSlow1, err := url.Parse(testUrl + `/slow1`) -- cgit v1.3