Skip to content

go vet: call to (*T).Fatalf from a non-test goroutine #412

@nathany

Description

@nathany

Describe the bug

go vet reports the following issue in our tests

./inotify_poller_test.go:182:5: call to (*T).Fatalf from a non-test goroutine
./inotify_test.go:341:4: call to (*T).Fatalf from a non-test goroutine
./integration_test.go:80:4: call to (*T).Fatalf from a non-test goroutine
./integration_test.go:843:4: call to (*T).Fatalf from a non-test goroutine

To Reproduce

Run go vet locally.

Expected behaviour

Errors need to be propagated back to the main goroutine where t.Fatalf can be called. Code like this needs to be updated:

go func() {
	for err := range watcher.Errors {
		t.Fatalf("error received: %s", err)
	}
}()

This needs to be resolved for CI to pass -- the first step before anything else.

Which operating system and version are you using?

all operating systems

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions