Skip to content

Commit

Permalink
Merge 0db9c7d into 56c1508
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuntaoLu committed Feb 16, 2019
2 parents 56c1508 + 0db9c7d commit ab5b469
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Expand Up @@ -150,12 +150,13 @@ test: generate lint
test-only:
@rm -f ./test/.cached_binary_test_info.json
@echo "Running all tests..."
@ZANZIBAR_CACHE=1 go test ./test/health_test.go # preload the binary cache
@PATH=$(PATH):$(GOIMPORTS) ZANZIBAR_CACHE=1 go test \
@ZANZIBAR_CACHE=1 go test -race ./test/health_test.go # preload the binary cache
@PATH=$(PATH):$(GOIMPORTS) ZANZIBAR_CACHE=1 go test -race \
./examples/example-gateway/... \
./codegen/... \
./runtime/... \
./test/... | \
./runtime/... | \
grep -v '\[no test files\]'
@PATH=$(PATH):$(GOIMPORTS) ZANZIBAR_CACHE=1 go test ./test/... | \
grep -v '\[no test files\]'
@rm -f ./test/.cached_binary_test_info.json
@echo "<coverage />" > ./coverage/cobertura-coverage.xml
Expand Down
6 changes: 6 additions & 0 deletions runtime/client_http_request_test.go
Expand Up @@ -43,6 +43,12 @@ var defaultTestOptions *testGateway.Options = &testGateway.Options{
}
var defaultTestConfig map[string]interface{} = map[string]interface{}{
"clients.baz.serviceName": "baz",

// disable circuit breaker to avoid race condition when running tests
// the circuit breaker lib emits metrics in a free goroutine, when the
// server closes, it attempts to close the channel for emitting metrics
// but the circuit breaker stats report goroutine could still be running
"clients.bar.circuitBreakerDisabled": true,
}

func TestMakingClientWriteJSONWithBadJSON(t *testing.T) {
Expand Down

0 comments on commit ab5b469

Please sign in to comment.