Skip to content

testing: -timeout affects benchmarks too (regression) #18845

@evverx

Description

@evverx

This regression was introduced in ead08e9#diff-70e628298261565d825f7199d13042f2L758

package bench

import (
        "testing"
        "time"
)

func BenchmarkSleep10(b *testing.B) {
        time.Sleep(10 * time.Second)
}
go test -v -bench=. -timeout=1s
  • go version go1.7.5 linux/amd64
BenchmarkSleep10-2             1        10000282918 ns/op
PASS
  • go version devel +6bdb0c1 Sun Jan 29 00:49:56 2017 +0000 linux/amd64
panic: test timed out after 1s

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions