]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/race: remove race from TestNoRaceAfterFunc2
authorMark Pulford <mark@kyne.com.au>
Fri, 6 Nov 2020 07:37:01 +0000 (18:37 +1100)
committerIan Lance Taylor <iant@golang.org>
Tue, 10 Nov 2020 15:05:17 +0000 (15:05 +0000)
For #14119

Change-Id: I2a9ae43da228cf5c3e38d1f0d1b0768145b6548f
Reviewed-on: https://go-review.googlesource.com/c/go/+/267998
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Run-TryBot: Dmitry Vyukov <dvyukov@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>

src/runtime/race/testdata/sync_test.go

index 2b2d95d76b11ab03b56c1338b23991eb97b5ff4f..b5fcd6c4cf4f7f939793dd9c376c4fe622740b83 100644 (file)
@@ -126,11 +126,11 @@ func TestNoRaceAfterFunc1(t *testing.T) {
 
 func TestNoRaceAfterFunc2(t *testing.T) {
        var x int
+       _ = x
        timer := time.AfterFunc(10, func() {
                x = 1
        })
        defer timer.Stop()
-       _ = x
 }
 
 func TestNoRaceAfterFunc3(t *testing.T) {