diff --git a/.circleci/config.yml b/.circleci/config.yml index 22237f1d2b..5a91e03627 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -154,9 +154,10 @@ jobs: - run: name: go test -race command: | - mkdir -p $TEST_RESULTS_DIR + mkdir -p $TEST_RESULTS_DIR /tmp/jsonfile gotestsum \ --format=short-verbose \ + --jsonfile /tmp/jsonfile/go-test-race.log \ --junitfile $TEST_RESULTS_DIR/gotestsum-report.xml -- \ -tags="$GOTAGS" -p 2 \ -race -gcflags=all=-d=checkptr=0 \ @@ -168,6 +169,8 @@ jobs: path: *TEST_RESULTS_DIR - store_artifacts: path: *TEST_RESULTS_DIR + - store_artifacts: + path: /tmp/jsonfile # split off a job for the API package since it is separate go-test-api: diff --git a/agent/consul/stream/event_snapshot_test.go b/agent/consul/stream/event_snapshot_test.go index a11be78551..5e62e7f94f 100644 --- a/agent/consul/stream/event_snapshot_test.go +++ b/agent/consul/stream/event_snapshot_test.go @@ -121,6 +121,12 @@ func TestEventSnapshot(t *testing.T) { require.NoError(t, err, "current state: snapDone=%v snapIDs=%s updateIDs=%s", snapDone, snapIDs, updateIDs) + if len(curItem.Events) == 0 { + // An item without an error or events is a bufferItem.NextLink event. + // A subscription handles this by proceeding to the next item, + // so we do the same here. + continue + } e := curItem.Events[0] switch { case snapDone: