aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2026-01-22 04:15:47 +0700
committerShulhan <ms@kilabit.info>2026-01-22 04:15:47 +0700
commita33efc3992f58355eb98d7a5574df955952924b8 (patch)
tree4a7d00be605fff1980a14a4c2c33a60ec91bc71b
parenta559b47dc217793ca7f80121b3ea86f03e47afd3 (diff)
downloadjarink-a33efc3992f58355eb98d7a5574df955952924b8.tar.xz
all: mark and skip the slow test
The TestScan_slow takes around ~11 seconds due to test include [time.Sleep].
-rw-r--r--Makefile2
-rw-r--r--brokenlinks/brokenlinks_test.go4
2 files changed, 5 insertions, 1 deletions
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`)