summaryrefslogtreecommitdiff
path: root/libgo/go/time/sleep_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/time/sleep_test.go')
-rw-r--r--libgo/go/time/sleep_test.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/libgo/go/time/sleep_test.go b/libgo/go/time/sleep_test.go
index 3cb088c319f..e572b678419 100644
--- a/libgo/go/time/sleep_test.go
+++ b/libgo/go/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)
@@ -165,7 +166,7 @@ func TestAfterQueuing(t *testing.T) {
}
// For gccgo omit 0 for now because it can take too long to start the
-var slots = []int{5, 3, 6, 6, 6, 1, 1, 2, 7, 9, 4, 8 /*0*/ }
+var slots = []int{5, 3, 6, 6, 6, 1, 1, 2, 7, 9, 4, 8 /*0*/}
type afterResult struct {
slot int
@@ -177,9 +178,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.