Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util/tracing: skip a few tests under deadlock detector #75439

Merged
merged 1 commit into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/util/tracing/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"fmt"
"testing"

"github.com/cockroachdb/cockroach/pkg/testutils/skip"
"github.com/cockroachdb/logtags"
"github.com/gogo/protobuf/types"
)
Expand All @@ -25,6 +26,7 @@ import (
// This benchmark explicitly excludes construction of
// the SpanOptions, which require allocations as well.
func BenchmarkTracer_StartSpanCtx(b *testing.B) {
skip.UnderDeadlock(b, "span reuse triggers false-positives in the deadlock detector")
ctx := context.Background()

staticLogTags := logtags.Buffer{}
Expand Down Expand Up @@ -103,6 +105,7 @@ func BenchmarkSpan_GetRecording(b *testing.B) {
}

func BenchmarkRecordingWithStructuredEvent(b *testing.B) {
skip.UnderDeadlock(b, "span reuse triggers false-positives in the deadlock detector")
tr := NewTracerWithOpt(context.Background(),
WithTracingMode(TracingModeActiveSpansRegistry),
WithSpanReusePercent(100))
Expand All @@ -121,6 +124,7 @@ func BenchmarkRecordingWithStructuredEvent(b *testing.B) {

// BenchmarkSpanCreation creates traces with a couple of spans in them.
func BenchmarkSpanCreation(b *testing.B) {
skip.UnderDeadlock(b, "span reuse triggers false-positives in the deadlock detector")
tr := NewTracerWithOpt(context.Background(),
WithTracingMode(TracingModeActiveSpansRegistry),
WithSpanReusePercent(100))
Expand Down
1 change: 1 addition & 0 deletions pkg/util/tracing/tracer_external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
func TestSpanPooling(t *testing.T) {
defer leaktest.AfterTest(t)()
skip.UnderRace(t, "sync.Pool seems to be emptied very frequently under race, making the test unreliable")
skip.UnderDeadlock(t, "span reuse triggers false-positives in the deadlock detector")
defer log.Scope(t).Close(t)
ctx := context.Background()
tr := tracing.NewTracerWithOpt(ctx,
Expand Down
1 change: 1 addition & 0 deletions pkg/util/tracing/tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ func TestChildNeedsSameTracerAsParent(t *testing.T) {
// one.
func TestSpanReuse(t *testing.T) {
skip.UnderRace(t, "sync.Pool seems to be emptied very frequently under race, making the test unreliable")
skip.UnderDeadlock(t, "span reuse triggers false-positives in the deadlock detector")
ctx := context.Background()
tr := NewTracerWithOpt(ctx,
// Ask the tracer to always reuse spans, overriding the testing's
Expand Down