From bfd7d0c46b50d9778eff2c12ea049a7b014bcead Mon Sep 17 00:00:00 2001 From: mhmxs Date: Sat, 14 Sep 2019 14:11:24 +0200 Subject: [PATCH] Add timeout for test execution --- .drone.yml | 6 +++--- cncd/pipeline/.drone.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index e32df4159..46b4c36c8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -15,7 +15,7 @@ pipeline: - go get -u golang.org/x/net/context/ctxhttp - go get -u github.com/golang/protobuf/proto - go get -u github.com/golang/protobuf/protoc-gen-go - - go test -cover $(go list ./... | grep -v /vendor/) + - go test -cover -timeout 30s $(go list ./... | grep -v /vendor/) test_postgres: image: golang:1.12.4 @@ -23,7 +23,7 @@ pipeline: - DATABASE_DRIVER=postgres - DATABASE_CONFIG=host=postgres user=postgres dbname=postgres sslmode=disable commands: - - go test github.com/laszlocph/woodpecker/store/datastore + - go test -timeout 30s github.com/laszlocph/woodpecker/store/datastore test_mysql: image: golang:1.12.4 @@ -31,7 +31,7 @@ pipeline: - DATABASE_DRIVER=mysql - DATABASE_CONFIG=root@tcp(mysql:3306)/test?parseTime=true commands: - - go test github.com/laszlocph/woodpecker/store/datastore + - go test -timeout 30s github.com/laszlocph/woodpecker/store/datastore build: image: golang:1.12.4 diff --git a/cncd/pipeline/.drone.yml b/cncd/pipeline/.drone.yml index 81405c049..4097aa625 100644 --- a/cncd/pipeline/.drone.yml +++ b/cncd/pipeline/.drone.yml @@ -12,4 +12,4 @@ pipeline: test: image: golang:1.8 commands: - - go test -cover github.com/laszlocph/woodpecker/cncd/pipeline/... + - go test -cover -timeout 30s github.com/laszlocph/woodpecker/cncd/pipeline/...