fix: resolve flaky tests and move test constants out of production code#6553
Closed
vividctrlalt wants to merge 0 commit into
Closed
fix: resolve flaky tests and move test constants out of production code#6553vividctrlalt wants to merge 0 commit into
vividctrlalt wants to merge 0 commit into
Conversation
386400f to
c158599
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BaseNetTestby adding null guards indestroy()and using random port for P2P listener to avoid port conflictsTEST_CONFfrom productionConstant.javato newTestConstants.javain the test moduleTESTNET_CONFtoNET_CONFfor clarity sinceconfig.confserves all network typesChanges
common/src/main/java/org/tron/core/Constant.java: RemoveTEST_CONF, renameTESTNET_CONF→NET_CONFframework/src/test/java/org/tron/common/TestConstants.java: New test constants classframework/src/test/java/org/tron/core/net/BaseNet.java: Add null guards indestroy(), use random portConstant.TEST_CONF→TestConstants.TEST_CONFConstant.TESTNET_CONF→Constant.NET_CONFTest plan