Skip to content

False positive with go test -trace=test.out #39

@imatmati

Description

@imatmati

As stated in the title, when you invoke the test command with a trace option, the test always fails with a message concerning trace:

--- FAIL: TestAnd (0.45s)
leaks.go:78: found unexpected goroutines:
[Goroutine 6 in state trace reader (blocked), with runtime.goparkunlock on top of the stack:
goroutine 6 [trace reader (blocked)]:
runtime.goparkunlock(...)
c:/go/src/runtime/proc.go:310

Even when the test is empty like this one :

package main

import (
	"testing"

	"go.uber.org/goleak"
)

func TestAnd(t *testing.T) {
	defer goleak.VerifyNone(t)

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions