coder/testutil/timing.go
Ammar Bandukwala 465fe8658d chore: skip timing-sensistive AgentMetadata test in the standard suite (#7237)
* chore: skip timing-sensistive AgentMetadata test in the standard suite

* Add test-timing target

* fix windows?

* Works on my Windows desktop?

* Use tag system

* fixup! Use tag system
2023-05-02 10:41:41 +00:00

21 lines
476 B
Go

package testutil
import (
"testing"
)
// We can't run timing-sensitive tests in CI because of the
// great variance in runner performance. Instead of not testing timing at all,
// we relegate it to humans manually running certain tests with the "-timing"
// flag from time to time.
//
// Eventually, we should run all timing tests in a self-hosted runner.
var timing bool
func SkipIfNotTiming(t *testing.T) {
if !timing {
t.Skip("skipping timing-sensitive test")
}
}