run synctest with Go 1.25

This commit is contained in:
Marco Munizaga
2026-01-07 10:58:00 -08:00
parent b0b2a1847d
commit f7e1986c25
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -9,10 +9,10 @@ runs:
shell: bash
# This matches only tests with "NoCover" in their test name to avoid running all tests again.
run: go test -tags nocover -run NoCover -v ./...
- name: Run synctests tests. These are tests that require go 1.24 and the experimental testing/synctest package
- name: Run synctests tests. These are tests that require go 1.25 and the experimental testing/synctest package
shell: bash
if: ${{ contains(matrix.go, '1.24') }}
run: go test -tags goexperiment.synctest -run "_synctest$" -v ./...
if: ${{ contains(matrix.go, '1.25') }}
run: go test -run "_synctest$" -v ./...
- name: Install testing tools
shell: bash
run: cd scripts/test_analysis && go install ./cmd/gotest2sql
+2 -2
View File
@@ -1,4 +1,4 @@
//go:build goexperiment.synctest
//go:build go1.25
package simconnlibp2p_test
@@ -19,7 +19,7 @@ import (
)
func TestSimpleLibp2pNetwork_synctest(t *testing.T) {
synctest.Run(func() {
synctest.Test(t, func(t *testing.T) {
latency := 10 * time.Millisecond
network, meta, err := simlibp2p.SimpleLibp2pNetwork([]simlibp2p.NodeLinkSettingsAndCount{
{LinkSettings: simnet.NodeBiDiLinkSettings{