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

Speed Up server_test with DB magic #2780

Merged
merged 5 commits into from Oct 8, 2019

Conversation

@chrisgilmerproj
Copy link
Contributor

commented Oct 7, 2019

Description

  • Truncate the DB early to make things speedier when cloning
  • Remove DB Truncate when not needed from some test suites
  • Use RawQuery to drop the DB or create the DB instead of shelling out

Setup

make server_test

Code Review Verification Steps

  • Request review from a member of a different team.
@chrisgilmerproj chrisgilmerproj changed the title Cg speed up db truncate clone Speed Up server_test with DB magic Oct 7, 2019
@codecov

This comment has been minimized.

Copy link

commented Oct 7, 2019

Codecov Report

Merging #2780 into master will increase coverage by 0.1%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master   #2780     +/-   ##
========================================
+ Coverage    57.8%   57.8%   +0.1%     
========================================
  Files         278     278             
  Lines       12623   12623             
========================================
+ Hits         7293    7295      +2     
+ Misses       4582    4581      -1     
+ Partials      748     747      -1
Impacted Files Coverage Δ
pkg/services/query/query_builder.go 86.2% <0%> (+1.4%) ⬆️
@chrisgilmerproj chrisgilmerproj marked this pull request as ready for review Oct 7, 2019
@chrisgilmerproj chrisgilmerproj self-assigned this Oct 7, 2019
@chrisgilmerproj chrisgilmerproj requested a review from reggieriser Oct 7, 2019
@jim
jim approved these changes Oct 8, 2019
Copy link
Contributor

left a comment

🚛

Do you have any benchmarks to share for this change? I'm curious how much of a difference this makes.

@chrisgilmerproj

This comment has been minimized.

Copy link
Contributor Author

commented Oct 8, 2019

@jim - I believe this cuts a minute or so off the runtime for both regular tests and coverage tests. Not huge but every bit counts.

@chrisgilmerproj chrisgilmerproj merged commit 4046dc8 into master Oct 8, 2019
18 checks passed
18 checks passed
ci/circleci: acceptance_tests_experimental Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_local Your tests passed on CircleCI!
Details
ci/circleci: acceptance_tests_staging Your tests passed on CircleCI!
Details
ci/circleci: build_app Your tests passed on CircleCI!
Details
ci/circleci: build_migrations Your tests passed on CircleCI!
Details
ci/circleci: build_storybook_app Your tests passed on CircleCI!
Details
ci/circleci: build_tasks Your tests passed on CircleCI!
Details
ci/circleci: build_tools Your tests passed on CircleCI!
Details
ci/circleci: check_generated_code Your tests passed on CircleCI!
Details
ci/circleci: client_test Your tests passed on CircleCI!
Details
ci/circleci: integration_tests Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_golang Your tests passed on CircleCI!
Details
ci/circleci: pre_deps_yarn Your tests passed on CircleCI!
Details
ci/circleci: pre_test Your tests passed on CircleCI!
Details
ci/circleci: server_test Your tests passed on CircleCI!
Details
ci/circleci: server_test_coverage Your tests passed on CircleCI!
Details
codecov/patch/go Coverage not affected when comparing b08f6b6...98c8ba4
Details
codecov/project/go 57.6% (+0.1%) compared to b08f6b6
Details
@chrisgilmerproj chrisgilmerproj deleted the cg_speed_up_db_truncate_clone branch Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.