[go] time: skip test that will fail with GO111MODULE=off

3 views
Skip to first unread message

Kevin Burke (Gerrit)

unread,
Dec 23, 2025, 1:12:37 AM (yesterday) Dec 23
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Kevin Burke has uploaded the change for review

Commit message

time: skip test that will fail with GO111MODULE=off

The test is designed to ensure that behavior introduced in Go 1.23
to garbage collect async timed channels is working correctly. If
GO111MODULE=off is set (or GODEBUG=asynctimerchan=1) Go reverts to the
Go 1.20 behavior of not garbage collecting these channels, which fails
the test.

Instead of running a test in conditions where we know it will fail,
just skip the test. A more comprehensive test does not make sense
right now because this code may go away soon.

Fixes #76948.
Change-Id: Ib186abd2ea583a06b5c246bfd6df932522cf7f1e

Change diff

diff --git a/src/time/export_test.go b/src/time/export_test.go
index a4940d1..78ce2ad 100644
--- a/src/time/export_test.go
+++ b/src/time/export_test.go
@@ -40,6 +40,7 @@
Tzset = tzset
TzsetName = tzsetName
TzsetOffset = tzsetOffset
+ AsynctimerChan = asynctimerchan
)

func LoadFromEmbeddedTZData(zone string) (string, error) {
diff --git a/src/time/tick_test.go b/src/time/tick_test.go
index dcbbcdb..9b39d28 100644
--- a/src/time/tick_test.go
+++ b/src/time/tick_test.go
@@ -266,6 +266,10 @@
}

func TestTimerGC(t *testing.T) {
+ if AsynctimerChan.Value() == "1" {
+ t.Skip("skipping TestTimerGC with asynctimerchan=1")
+ }
+
run := func(t *testing.T, what string, f func()) {
t.Helper()
t.Run(what, func(t *testing.T) {

Change information

Files:
  • M src/time/export_test.go
  • M src/time/tick_test.go
Change size: XS
Delta: 2 files changed, 5 insertions(+), 0 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ib186abd2ea583a06b5c246bfd6df932522cf7f1e
Gerrit-Change-Number: 732100
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Burke <ke...@burke.dev>
unsatisfied_requirement
satisfied_requirement
open
diffy

Michael Knyszek (Gerrit)

unread,
Dec 23, 2025, 1:46:54 PM (yesterday) Dec 23
to Kevin Burke, goph...@pubsubhelper.golang.org, Russ Cox, Gopher Robot, golang-co...@googlegroups.com
Attention needed from Kevin Burke and Russ Cox

Michael Knyszek voted Code-Review+2

Code-Review+2
Open in Gerrit

Related details

Attention is currently required from:
  • Kevin Burke
  • Russ Cox
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: Ib186abd2ea583a06b5c246bfd6df932522cf7f1e
Gerrit-Change-Number: 732100
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Burke <ke...@burke.dev>
Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
Gerrit-Reviewer: Russ Cox <r...@golang.org>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-Attention: Russ Cox <r...@golang.org>
Gerrit-Attention: Kevin Burke <ke...@burke.dev>
Gerrit-Comment-Date: Tue, 23 Dec 2025 18:46:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Nicholas Husin (Gerrit)

unread,
Dec 23, 2025, 1:50:14 PM (yesterday) Dec 23
to Kevin Burke, goph...@pubsubhelper.golang.org, Russ Cox, Gopher Robot, golang-co...@googlegroups.com
Attention needed from Kevin Burke and Russ Cox

Nicholas Husin voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Kevin Burke
  • Russ Cox
Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib186abd2ea583a06b5c246bfd6df932522cf7f1e
    Gerrit-Change-Number: 732100
    Gerrit-PatchSet: 1
    Gerrit-Owner: Kevin Burke <ke...@burke.dev>
    Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
    Gerrit-Reviewer: Nicholas Husin <hu...@google.com>
    Gerrit-Reviewer: Russ Cox <r...@golang.org>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Attention: Russ Cox <r...@golang.org>
    Gerrit-Attention: Kevin Burke <ke...@burke.dev>
    Gerrit-Comment-Date: Tue, 23 Dec 2025 18:50:11 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Roland Shoemaker (Gerrit)

    unread,
    Dec 23, 2025, 2:37:11 PM (yesterday) Dec 23
    to Kevin Burke, goph...@pubsubhelper.golang.org, Nicholas Husin, Russ Cox, Gopher Robot, golang-co...@googlegroups.com
    Attention needed from Kevin Burke and Russ Cox

    Roland Shoemaker voted Commit-Queue+1

    Commit-Queue+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Kevin Burke
    • Russ Cox
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib186abd2ea583a06b5c246bfd6df932522cf7f1e
    Gerrit-Change-Number: 732100
    Gerrit-PatchSet: 1
    Gerrit-Owner: Kevin Burke <ke...@burke.dev>
    Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
    Gerrit-Reviewer: Nicholas Husin <hu...@google.com>
    Gerrit-Reviewer: Roland Shoemaker <rol...@golang.org>
    Gerrit-Reviewer: Russ Cox <r...@golang.org>
    Gerrit-CC: Gopher Robot <go...@golang.org>
    Gerrit-Attention: Russ Cox <r...@golang.org>
    Gerrit-Attention: Kevin Burke <ke...@burke.dev>
    Gerrit-Comment-Date: Tue, 23 Dec 2025 19:37:04 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kevin Burke (Gerrit)

    unread,
    Dec 23, 2025, 3:51:48 PM (yesterday) Dec 23
    to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Go LUCI, Roland Shoemaker, Nicholas Husin, Michael Knyszek, Russ Cox, Gopher Robot, golang-co...@googlegroups.com

    Kevin Burke submitted the change

    Change information

    Commit message:
    time: skip test that will fail with GO111MODULE=off

    The test is designed to ensure that behavior introduced in Go 1.23
    to garbage collect async timed channels is working correctly. If
    GO111MODULE=off is set (or GODEBUG=asynctimerchan=1) Go reverts to the
    Go 1.20 behavior of not garbage collecting these channels, which fails
    the test.

    Instead of running a test in conditions where we know it will fail,
    just skip the test. A more comprehensive test does not make sense
    right now because this code may go away soon.

    Fixes #76948.
    Change-Id: Ib186abd2ea583a06b5c246bfd6df932522cf7f1e
    Reviewed-by: Nicholas Husin <hu...@google.com>
    Reviewed-by: Michael Knyszek <mkny...@google.com>
    Files:
    • M src/time/export_test.go
    • M src/time/tick_test.go
    Change size: XS
    Delta: 2 files changed, 5 insertions(+), 0 deletions(-)
    Branch: refs/heads/master
    Submit Requirements:
    • requirement satisfiedCode-Review: +2 by Michael Knyszek, +1 by Nicholas Husin
    • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ib186abd2ea583a06b5c246bfd6df932522cf7f1e
    Gerrit-Change-Number: 732100
    Gerrit-PatchSet: 2
    Gerrit-Owner: Kevin Burke <ke...@burke.dev>
    Gerrit-Reviewer: Kevin Burke <ke...@burke.dev>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages