mirror of
https://github.com/libp2p/go-libp2p.git
synced 2026-04-22 16:17:19 +08:00
run synctest with Go 1.25
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user