Skip to content

Fix few things in test code#398

Merged
majecty merged 8 commits intoCodeChain-io:masterfrom
majecty:f/fix-test
May 20, 2020
Merged

Fix few things in test code#398
majecty merged 8 commits intoCodeChain-io:masterfrom
majecty:f/fix-test

Conversation

@majecty
Copy link

@majecty majecty commented May 20, 2020

@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 sleep method is good or not.

@majecty majecty requested a review from sgkim126 May 20, 2020 03:09
}
};

if std::env::var("RUN_ON_TEST").is_ok() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

sgkim126
sgkim126 previously approved these changes May 20, 2020
Park Juhyung 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.
Park Juhyung 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 sgkim126 self-requested a review May 20, 2020 06:46
@majecty majecty merged commit 6375868 into CodeChain-io:master May 20, 2020
@majecty majecty deleted the f/fix-test branch May 20, 2020 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants