From 5ed03480e7a03d5d957f7f43c0ad0bd46cb462c8 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sat, 27 Nov 2021 13:41:00 +0100 Subject: [PATCH] run sqlite tests in parallel (#331) --- .drone.yml | 4 ++-- CONTRIBUTING.md | 2 +- scripts/test.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 587f2e98d..7f82fa497 100644 --- a/.drone.yml +++ b/.drone.yml @@ -36,7 +36,7 @@ steps: - name: go-src path: /go commands: - - CGO_ENABLED=0 GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test -p 1 ./... + - CGO_ENABLED=0 GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test ./... when: event: include: @@ -115,6 +115,6 @@ trigger: --- kind: signature -hmac: 07d6ed18510f9591c6b347d6768cbe8e613561b3759f1a8dda8721d1d231a522 +hmac: 8a363baa3c7b5e581bd101a7774422042833b7d297faf5d93c9156cf54a31124 ... diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 36fc16dad..dc03a1eae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -160,7 +160,7 @@ There are a few different ways of running tests. Each requires the use of the `- If you want to run tests as quickly as possible, using an SQLite in-memory database, use: ```bash -GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test -p 1 ./... +GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test ./... ``` #### Postgres diff --git a/scripts/test.sh b/scripts/test.sh index 09e9ae42e..befc82adf 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -7,7 +7,7 @@ set -e # "./..." = all tests # run tests with sqlite in-memory database -GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test -count 1 -p 1 ./... +GTS_DB_TYPE="sqlite" GTS_DB_ADDRESS=":memory:" go test -count 1 ./... # run tests with postgres database at either GTS_DB_ADDRESS or default localhost GTS_DB_TYPE="postgres" GTS_DB_ADDRESS="${GTS_DB_ADDRESS:-localhost}" go test -count 1 -p 1 ./...