]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: minor test cleanup
authorDmitriy Vyukov <dvyukov@google.com>
Mon, 15 Jul 2013 21:02:42 +0000 (01:02 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Mon, 15 Jul 2013 21:02:42 +0000 (01:02 +0400)
R=golang-dev, khr, rsc
CC=golang-dev
https://golang.org/cl/11280043

src/pkg/runtime/proc_test.go

index 0e28d5a2d1d3572759dbcd9071c8a2c93548cf2e..29e65da3548cf5b544779ece78aaaceed6fa8123 100644 (file)
@@ -227,7 +227,7 @@ func TestPreemptSplitBig(t *testing.T) {
        stop := make(chan int)
        go big(stop)
        for i := 0; i < 3; i++ {
-               time.Sleep(1 * time.Microsecond) // let big start running
+               time.Sleep(10 * time.Microsecond) // let big start running
                runtime.GC()
        }
        close(stop)
@@ -237,7 +237,7 @@ func big(stop chan int) int {
        n := 0
        for {
                // delay so that gc is sure to have asked for a preemption
-               for i := int64(0); i < 1e9; i++ {
+               for i := 0; i < 1e9; i++ {
                        n++
                }
 
@@ -286,9 +286,6 @@ func nonleaf(stop chan int) bool {
        }
 }
 
-func poll() {
-}
-
 func TestSchedLocalQueue(t *testing.T) {
        runtime.TestSchedLocalQueue1()
 }