-
Notifications
You must be signed in to change notification settings - Fork 8
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
Guanyu/dockerfiles #110
Guanyu/dockerfiles #110
Conversation
JBGYZ
commented
May 2, 2022
•
edited
Loading
edited
- Created 2 bash scripts for starting and setting up multiple nodes with docker containers or on local and stock the log files in ./log directory
- Supported killing a node while testing in scenario test
- Added an autotest script allowing testing multiple times the same election setting and calculate the success rate at end
- Reset timeout in services and smart contracts as a function of node number
- Added pooling mechanism in the scenario test
Used jinja template to generate docker-compose file for multiple nodes start
Support for dynamic IP addr
Rm docker compose and static version container setup files
Guanyu Zhang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Pull Request Test Coverage Report for Build 2417666751Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
integration/scenario_test.go
Outdated
@@ -548,3 +579,99 @@ func getElectionInfo(proxyAddr, electionID string, t *testing.T) ptypes.GetElect | |||
return infoElection | |||
|
|||
} | |||
|
|||
// func killNode(proxyArray []string, nodeNub int, t *testing.T) []string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to keep this commented code ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 2 functions killNode and restartNode are used to test cases where we kill and restart nodes. But in order to pass CI test, we just use the normal scenario test without killing node. We commented those codes to pass lint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting code is not the best way to pass lint ... ;)
Please un-comment the code and fix the linting error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use this trick
if false {
proxyArray = killNode(proxyArray, 3, t)
restartNode(3, t)
}
and uncomment functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added new env var KILLNODE to control kill and restart node
Co-authored-by: Noémien Kocher <nkcr.je@gmail.com>
…into guanyu/dockerfiles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Close to merge! 🎊
integration/scenario_test.go
Outdated
|
||
} | ||
time.Sleep(time.Second * 5) | ||
|
||
// Kill and restart the node, change false to true when we want to use | ||
if false { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be replaced by an env variable:
if os.GetEnv("KILL_NODE" == "true")
_, err = io.ReadAll(resp.Body) | ||
require.NoError(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be removed, if the body is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Kudos, SonarCloud Quality Gate passed! |