Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: update TestCatchupOverGossip to be less parallel and use sub-tests #5731

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions test/e2e-go/features/catchup/basicCatchup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package catchup

import (
"fmt"
"os"
"path/filepath"
"testing"
Expand Down Expand Up @@ -98,20 +99,23 @@ func TestCatchupOverGossip(t *testing.T) {
partitiontest.PartitionTest(t)
defer fixtures.ShutdownSynchronizedTest(t)

t.Parallel()

syncTest := fixtures.SynchronizedTest(t)
supportedVersions := network.SupportedProtocolVersions
require.LessOrEqual(syncTest, len(supportedVersions), 3)

subTest := func(tt *testing.T, ledgerVer, fetcherVer string) {
tt.Run(fmt.Sprintf("ledger=%s,fetcher=%s", ledgerVer, fetcherVer),
func(t *testing.T) { runCatchupOverGossip(t, ledgerVer, fetcherVer) })
}

// ledger node upgraded version, fetcher node upgraded version
// Run with the default values. Instead of "", pass the default value
// to exercise loading it from the config file.
runCatchupOverGossip(syncTest, supportedVersions[0], supportedVersions[0])
for i := 1; i < len(supportedVersions); i++ {
runCatchupOverGossip(t, supportedVersions[i], "")
algorandskiy marked this conversation as resolved.
Show resolved Hide resolved
runCatchupOverGossip(t, "", supportedVersions[i])
runCatchupOverGossip(t, supportedVersions[i], supportedVersions[i])
subTest(t, supportedVersions[i], "")
subTest(t, "", supportedVersions[i])
subTest(t, supportedVersions[i], supportedVersions[i])
}
}

Expand Down