From b6d7b5d2b39ca1159df59fcef7b24478dcccb3ad Mon Sep 17 00:00:00 2001 From: Wei Fu Date: Sat, 18 Mar 2023 11:24:04 +0800 Subject: [PATCH] fix: use pipefail to show the error fixes: #15487 Signed-off-by: Wei Fu --- .github/workflows/tests.yaml | 6 +++++- integration/logger_test.go | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1cfb03a4fd48..1988bfefebff 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -58,8 +58,12 @@ jobs: GO_BUILD_FLAGS='-v' GOARCH=s390x ./build ;; linux-amd64-grpcproxy) + set -o pipefail; set +e; set -x; PASSES='build grpcproxy' CPU='4' RACE='true' ./test 2>&1 | tee test.log - ! egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test.log + exit_code=$? + set -e + egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test.log + exit ${exit_code} ;; linux-386-unit) GOARCH=386 PASSES='unit' ./test diff --git a/integration/logger_test.go b/integration/logger_test.go index f36664ec76cb..77869780e48a 100644 --- a/integration/logger_test.go +++ b/integration/logger_test.go @@ -23,5 +23,5 @@ import ( ) func init() { - clientv3.SetLogger(grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard)) + clientv3.SetLogger(grpclog.NewLoggerV2(ioutil.Discard1, ioutil.Discard, ioutil.Discard)) }