diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3133fc102b..5fe956ca37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -241,8 +241,7 @@ jobs: - name: Lint with slicelabels uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 with: - # goexperiment.synctest to ensure we don't miss files that depend on it. - args: --verbose --build-tags=slicelabels,goexperiment.synctest + args: --verbose --build-tags=slicelabels version: ${{ steps.golangci-lint-version.outputs.version }} - name: Lint with dedupelabels uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 diff --git a/util/testutil/synctest/disabled.go b/util/testutil/synctest/disabled.go deleted file mode 100644 index 595b93c650..0000000000 --- a/util/testutil/synctest/disabled.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !goexperiment.synctest && !go1.25 - -package synctest - -import ( - "testing" -) - -func Test(t *testing.T, _ func(t *testing.T)) { - t.Skip("goexperiment.synctest is not enabled") -} - -func Wait() { - // It isn't meant to be called outside of Test(). - panic("goexperiment.synctest is not enabled") -} diff --git a/util/testutil/synctest/enabled.go b/util/testutil/synctest/enabled.go deleted file mode 100644 index d219903809..0000000000 --- a/util/testutil/synctest/enabled.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright The Prometheus Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build goexperiment.synctest && !go1.25 - -package synctest - -import ( - "testing" - "testing/synctest" -) - -func Test(t *testing.T, f func(t *testing.T)) { - synctest.Run(func() { - f(t) - }) -} - -func Wait() { - synctest.Wait() -} diff --git a/util/testutil/synctest/synctest.go b/util/testutil/synctest/synctest.go index 41750f9892..e3099c2d6a 100644 --- a/util/testutil/synctest/synctest.go +++ b/util/testutil/synctest/synctest.go @@ -11,8 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.25 - package synctest import (