summaryrefslogtreecommitdiff
path: root/src/pkg/time/sleep_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/time/sleep_test.go')
-rw-r--r--src/pkg/time/sleep_test.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/pkg/time/sleep_test.go b/src/pkg/time/sleep_test.go
index b12a5a168..9b0b7f7e0 100644
--- a/src/pkg/time/sleep_test.go
+++ b/src/pkg/time/sleep_test.go
@@ -108,10 +108,11 @@ func TestAfter(t *testing.T) {
}
func TestAfterTick(t *testing.T) {
- const (
- Delta = 100 * Millisecond
- Count = 10
- )
+ const Count = 10
+ Delta := 100 * Millisecond
+ if testing.Short() {
+ Delta = 10 * Millisecond
+ }
t0 := Now()
for i := 0; i < Count; i++ {
<-After(Delta)
@@ -176,9 +177,10 @@ func await(slot int, result chan<- afterResult, ac <-chan Time) {
}
func testAfterQueuing(t *testing.T) error {
- const (
- Delta = 100 * Millisecond
- )
+ Delta := 100 * Millisecond
+ if testing.Short() {
+ Delta = 20 * Millisecond
+ }
// make the result channel buffered because we don't want
// to depend on channel queueing semantics that might
// possibly change in the future.