test(db): add test for db#5463
Merged
forfreeday merged 2 commits intotronprotocol:release_v4.7.3from Sep 18, 2023
Merged
Conversation
lurais
reviewed
Sep 4, 2023
| private static final byte[] ASSET_KEY = "20000".getBytes(); | ||
| private static AccountCapsule ownerCapsule; | ||
|
|
||
| private static String OWNER_ADDRESS = Wallet.getAddressPreFixString() |
Contributor
Author
There was a problem hiding this comment.
It's not necessary, and not using final doesn't hurt.
|
|
||
|
|
||
| private long createAsset(String tokenName) { | ||
| long id = chainBaseManager.getDynamicPropertiesStore().getTokenIdNum() + 1; |
Contributor
There was a problem hiding this comment.
Will this be conflict in any two test cases?
| AssetIssueContractOuterClass.AssetIssueContract.newBuilder() | ||
| .setName(ByteString.copyFrom(firstTokenId.getBytes())) | ||
| .build()); | ||
| assetIssueCapsule.setId(String.valueOf(2L)); |
Contributor
There was a problem hiding this comment.
Should this not be the same as the token "efg"?
Contributor
Author
There was a problem hiding this comment.
efg is the test data in testPut, and as this is a deleted test case, it makes sense not to use the same data
|
|
||
| private SmartContractOuterClass.SmartContract.Builder createContract( | ||
| String contractAddress, String contractName) { | ||
| OWNER_ADDRESS = |
Contributor
There was a problem hiding this comment.
Why not return the contract?
Contributor
Author
There was a problem hiding this comment.
There is no need to return contract, it is a static variable.
5 tasks
lurais
approved these changes
Sep 12, 2023
xxo1shine
approved these changes
Sep 13, 2023
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.
What does this PR do?
add several test cases to cover more code verification scenarios
Why are these changes required?
to improve test case coverage
This PR has been tested by:
Follow up
Extra details