refactor: move test constant out of production code and rename NET_CONF#6555
Open
vividctrlalt wants to merge 8 commits intotronprotocol:developfrom
Open
refactor: move test constant out of production code and rename NET_CONF#6555vividctrlalt wants to merge 8 commits intotronprotocol:developfrom
vividctrlalt wants to merge 8 commits intotronprotocol:developfrom
Conversation
- ApiUtilTest: replace Base58 address decoding with raw hex bytes to remove dependency on CommonParameter singleton initialization - BaseNet: add null guards in destroy() to prevent NPE when P2P service fails to start due to port conflicts
The root cause of the flaky test is DecodeUtil.addressPreFixByte being polluted by other tests using testnet config, not the test itself. The proper fix should be in Args.clearParam() to reset the address prefix byte.
…T_CONF Move test-only constant TEST_CONF from production Constant.java to a new TestConstants class in framework/src/test. Rename TESTNET_CONF to NET_CONF for clarity since config.conf serves all network types.
Resolve merge conflicts by accepting remote changes and re-applying our constant renames (TEST_CONF → TestConstants.TEST_CONF, TESTNET_CONF → NET_CONF). Accept remote deletion of BaseNet.java. Fix 6 new remote files that referenced old constant names.
Sort TestConstants import alphabetically among other imports. Wrap lines exceeding 100 chars caused by longer constant name.
- Fix mixed full-width/half-width brackets in description and prerequisites - Add separator in hardware table for storage options - Fix incorrect Shasta link text (shastaex.io -> shasta.tronex.io) - Unify Resources section with consistent description format - Replace Gitter badge with Discord badge Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add GitHub Actions workflow that runs on PRs to develop and release branches with four jobs: PR title/description lint, compilation check, checkstyle validation for framework and plugins modules, and unit tests with artifact upload on failure.
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
TEST_CONFfrom productionConstant.javato newTestConstants.javain the test module (framework/src/test)TESTNET_CONFtoNET_CONFfor clarity, sinceconfig.confserves all network types (testnet, mainnet, beta)Changes
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 class withTEST_CONFConstant.TEST_CONF→TestConstants.TEST_CONF, fix import order and line lengthConstant.TESTNET_CONF→Constant.NET_CONFTest plan