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

test!: adds the ability to set or unset bbr in e2e tests #3817

Merged
merged 38 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a55f1f4
adds the ability to set or unset bbr in e2e tests
staheri14 Aug 23, 2024
5268516
resolves linter issues
staheri14 Aug 23, 2024
0492a82
pass bbr flag for the versions that support it
staheri14 Aug 23, 2024
f47262b
checks against the latest version as well
staheri14 Aug 23, 2024
c9e738f
removes print statements
staheri14 Aug 23, 2024
64328e3
does not compare with the bbr version
staheri14 Aug 26, 2024
6b9e4f1
Merge remote-tracking branch 'origin/main' into sanaz/disable-bbr-in-…
staheri14 Aug 28, 2024
9265070
adds a parameter to set bbr in the node creation methods instead of u…
staheri14 Aug 28, 2024
5eab0b8
replaces equalOrHigher with isBBRCompatible
staheri14 Aug 28, 2024
fc8adfc
disables BBR for e2e tests
staheri14 Aug 28, 2024
ac5975d
disables bbr on upgrade if applicable
staheri14 Aug 28, 2024
ed8cd89
logs state of nodes while forwarding ports
staheri14 Aug 28, 2024
a92ee08
adds bbr option to the benchmark tests
staheri14 Aug 28, 2024
64cf5ec
removes unused enableBBR parameter from testnet.New
staheri14 Aug 28, 2024
7f2e46f
deletes enableBBR as argument in e2e tests initialization
staheri14 Aug 28, 2024
95822b7
removes an old comment
staheri14 Aug 28, 2024
25ab5a6
renames enableBBR to disableBBR
staheri14 Aug 28, 2024
20c82d5
brings back original number of nodes
staheri14 Aug 28, 2024
366d55a
disables bbr in E2ESimple
staheri14 Aug 28, 2024
46c5799
makes disableBBR parameter ineffective in the Node's Upgrade
staheri14 Aug 28, 2024
9769d08
fixes left-over of refactoring
staheri14 Aug 28, 2024
9256ec6
resolves some of the linter issues
staheri14 Aug 28, 2024
e1eca7b
adds bbr to the chain id
staheri14 Aug 29, 2024
8b374cd
refactors isBBRCompatible
staheri14 Aug 29, 2024
3bb0939
retrieves the old version of Upgrade
staheri14 Aug 29, 2024
c807319
disables bbr for MinorVersionCompatibility
staheri14 Aug 29, 2024
91b91b4
disables BBR in benchmark tests
staheri14 Aug 29, 2024
6b108ad
fixes a bug
staheri14 Aug 29, 2024
6a831a6
deletes args field from Node
staheri14 Aug 30, 2024
2b10f77
Merge remote-tracking branch 'origin/main' into sanaz/disable-bbr-in-…
staheri14 Aug 30, 2024
d2f5eb7
minor formatting fix
staheri14 Aug 30, 2024
7e83039
fixes a bug
staheri14 Aug 31, 2024
92f5a66
removes fmt statement
staheri14 Aug 31, 2024
00ce90f
Merge remote-tracking branch 'origin/main' into sanaz/disable-bbr-in-…
staheri14 Sep 9, 2024
b4687e7
Merge remote-tracking branch 'origin/main' into sanaz/disable-bbr-in-…
staheri14 Sep 10, 2024
a382bdd
fixes some linter issues
staheri14 Sep 10, 2024
50dff70
Merge branch 'main' into sanaz/disable-bbr-in-e2e-tests
staheri14 Sep 11, 2024
e70939a
Merge branch 'main' into sanaz/disable-bbr-in-e2e-tests
staheri14 Sep 11, 2024
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
Prev Previous commit
Next Next commit
resolves some of the linter issues
  • Loading branch information
staheri14 committed Aug 28, 2024
commit 9256ec6c92d90a80c724dcf9528dac82f0f4734e
9 changes: 3 additions & 6 deletions test/e2e/minor_version_compatibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func MinorVersionCompatibility(logger *log.Logger) error {
// each node begins with a random version within the same major version set
v := versions.Random(r).String()
logger.Println("Starting node", "node", i, "version", v)
var disableBBR = false
disableBBR := false
// bbr is only available after a certain version,
// the flag needs to be passed only for versions that support it
if isBBRCompatible(v) {
Expand Down Expand Up @@ -93,7 +93,7 @@ func MinorVersionCompatibility(logger *log.Logger) error {

newVersion := versions.Random(r).String()
logger.Println("Upgrading node", "node", i%numNodes+1, "version", newVersion)
var disableBBR = false
disableBBR := false
// bbr is only available after a certain version,
// the flag needs to be passed only for versions that support it
if isBBRCompatible(newVersion) {
Expand Down Expand Up @@ -142,8 +142,5 @@ func getAllVersions() (string, error) {
// isBBRCompatible returns true if version is bbr compatible
// MUST be called only for versions that follow semver
func isBBRCompatible(v string) bool {
if v >= "v2.1.2" {
return true
}
return false
return v >= "v2.1.2"
}
11 changes: 1 addition & 10 deletions test/e2e/testnet/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,12 @@
}
}

func (n *Node) Upgrade(version string, disableBBR bool) error {

Check failure on line 373 in test/e2e/testnet/node.go

View workflow job for this annotation

GitHub Actions / lint / golangci-lint

unused-parameter: parameter 'disableBBR' seems to be unused, consider removing or renaming it as _ (revive)
if err := n.Instance.SetImageInstant(DockerImageName(version)); err != nil {
return err
}

//if disableBBR {
// if disableBBR {
// // FIXME: This does not work currently since the node is not in state 'Preparing' or 'Committed'
// //n.args = append(n.args, "--force-no-bbr")
// //err := n.Instance.SetArgs(n.args...)
Expand All @@ -394,12 +394,3 @@
func (n *Node) GetArgs() []string {
return n.args
}

func contains(slice []string, str string) bool {
for _, v := range slice {
if v == str {
return true
}
}
return false
}
Loading