Fix few things in test code#398
Merged
majecty merged 8 commits intoCodeChain-io:masterfrom May 20, 2020
Merged
Conversation
sgkim126
reviewed
May 20, 2020
| } | ||
| }; | ||
|
|
||
| if std::env::var("RUN_ON_TEST").is_ok() { |
sgkim126
previously approved these changes
May 20, 2020
added 5 commits
May 20, 2020 14:09
This commit removes accidental error messages from Snapshot code. Before this commit, tests were using the same snapshot path. Since our test does not clean "db" directory and "snapshot" directory, the follower tests can read snapshots from the previous run. Since the snapshots from the previous tests were generated from unknown hash for the current test, Snapshot code was printing error messages for them.
Add @types/bn.js to dev dependency to remove the error from typescript compile. When we run `yarn tsc -p . --noEmit`, it failed since we can't find @types/bn.js. We are not using directly @types/bn.js, but rlp library depends on it.
Since we removed RPC from SDK, we are not receiving server parameter in SDK constructor.
added 2 commits
May 20, 2020 15:11
This will make Foundry in tests not to increase view to high. Before this commit, some tests (for example dv.nomination.test.ts) sometimes creates a block with a very high view like 9. It was because blocks were created so fast and the timestamp of a block is too future for Foundry.
sgkim126
approved these changes
May 20, 2020
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.
@sgkim126 Could you check "Make Foundry makes blocks slowly if RUN_ON_TEST is set" commit carefully. I'm not sure using an environment variable and the
sleepmethod is good or not.