Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightweight testlib #4622

Merged
merged 44 commits into from
Aug 12, 2021
Merged

Lightweight testlib #4622

merged 44 commits into from
Aug 12, 2021

Conversation

nikurt
Copy link
Contributor

@nikurt nikurt commented Aug 2, 2021

Remove the dependency of testlib on nearcore by extracting tests and code dependeing on nearcore into integration-tests.

nikurt and others added 28 commits July 26, 2021 15:29
…y dependency on RuntimeNode outside of integration tests
… depending on it into 'integration-tests', also move 'testlib_test_helpers'. 'testlib/run_nodes.rs' is special, turn it into a crate that depends on 'integration_tests'
@nikurt nikurt requested a review from matklad August 2, 2021 16:57
@nikurt nikurt marked this pull request as ready for review August 10, 2021 12:23
nikurt and others added 5 commits August 10, 2021 14:31
# Conflicts:
#	Cargo.lock
#	integration-tests/Cargo.toml
#	integration-tests/tests/client/chunks_management.rs
#	integration-tests/tests/test_errors.rs
#	runtime/runtime/src/state_viewer/mod.rs
#	test-utils/testlib/src/lib.rs
#	test-utils/testlib/src/runtime_utils.rs
Copy link
Collaborator

@frol frol left a comment

Choose a reason for hiding this comment

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

I see many things move around. The whole reorg makes total sense to me, but I fear I could miss some minor details among the changes; are there any?

Also, can we measure the wins that we achieve with this reorg (e.g. compilation / testing times)? I would love to see those

@frol
Copy link
Collaborator

frol commented Aug 10, 2021

Just to bring some color here, @miraclx is also working on quality of life improvements for nearcore codebase, and here is a recent win: #4651 (comment)

@nikurt Thanks for pulling this out!

test-utils/run-nodes/Cargo.toml Outdated Show resolved Hide resolved
@nikurt
Copy link
Contributor Author

nikurt commented Aug 11, 2021

Just to bring some color here, @miraclx is also working on quality of life improvements for nearcore codebase, and here is a recent win: #4651 (comment)
Thanks for the link. Now I'm also curios, will measure the impact and report here.

@nikurt
Copy link
Contributor Author

nikurt commented Aug 11, 2021

minor details among the changes; are there any?
I tried to keep the PR as simple as possible, without making any changes unrelated to the refactoring. The worst that could happen is an artifact of merging, which hopefully is caught by buildkite.

@nikurt nikurt mentioned this pull request Aug 11, 2021
@nikurt
Copy link
Contributor Author

nikurt commented Aug 11, 2021

Created #4670 to remove run_nodes.rs.

@nikurt nikurt linked an issue Aug 11, 2021 that may be closed by this pull request
@nikurt
Copy link
Contributor Author

nikurt commented Aug 11, 2021

Just to bring some color here, @miraclx is also working on quality of life improvements for nearcore codebase, and here is a recent win: #4651 (comment)
Thanks for the link. Now I'm also curios, will measure the impact and report here.

cargo test -p node-runtime
debug clean build time: 4m 30s / 4m 20s
debug binary size: 78 MB / 71 MB
dependencies: 612 / 591
debug test runtime: 6m 0s / 30s

cargo test -p nearcore
debug clean build time: 4m 46s / 4m 9s
debug binary size: 96M / 96M
dependencies: 616 / 608
debug test runtime: 9m 50s / 5s

near-bulldozer bot pushed a commit that referenced this pull request Aug 11, 2021
Remove `run_nodes.rs`, which is a standalone binary built as part of the `testlib` crate. No usages of `run_nodes` were identified in `near-ops`, `nearcore` or `nearup` repositories.

Part of PR #4622
# Conflicts:
#	test-utils/run-nodes/src/main.rs
@near-bulldozer near-bulldozer bot merged commit fd7bcc0 into master Aug 12, 2021
@near-bulldozer near-bulldozer bot deleted the testlib-1 branch August 12, 2021 14:17
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.

Consider removing circular dependencies during tests
4 participants