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

test(checker): add importchecker test #2042

Merged
merged 1 commit into from Feb 25, 2021
Merged

test(checker): add importchecker test #2042

merged 1 commit into from Feb 25, 2021

Conversation

Yongxuanzhang
Copy link
Contributor

No description provided.

@jina-bot jina-bot added size/S area/testing This issue/PR affects testing labels Feb 25, 2021
@codecov
Copy link

codecov bot commented Feb 25, 2021

Codecov Report

Merging #2042 (d744382) into master (1f4ded9) will decrease coverage by 28.31%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2042       +/-   ##
===========================================
- Coverage   88.75%   60.44%   -28.32%     
===========================================
  Files         200      181       -19     
  Lines       10933    10372      -561     
===========================================
- Hits         9704     6269     -3435     
- Misses       1229     4103     +2874     
Flag Coverage Δ
daemon ?
jina 60.44% <ø> (-28.76%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
jina/parsers/ping.py 0.00% <0.00%> (-100.00%) ⬇️
jina/docker/helper.py 0.00% <0.00%> (-100.00%) ⬇️
jina/parsers/hub/new.py 0.00% <0.00%> (-100.00%) ⬇️
jina/parsers/hub/list.py 0.00% <0.00%> (-100.00%) ⬇️
jina/parsers/hub/build.py 0.00% <0.00%> (-100.00%) ⬇️
jina/parsers/hub/login.py 0.00% <0.00%> (-100.00%) ⬇️
jina/parsers/optimizer.py 0.00% <0.00%> (-100.00%) ⬇️
jina/parsers/hub/pushpull.py 0.00% <0.00%> (-100.00%) ⬇️
jina/types/request/common.py 0.00% <0.00%> (-100.00%) ⬇️
jina/jaml/parsers/default/v1.py 0.00% <0.00%> (-100.00%) ⬇️
... and 137 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6982572...d744382. Read the comment docs.

@github-actions
Copy link

Latency summary

Current PR yields:

  • 😶 index QPS at 1121, delta to last 3 avg.: +2%
  • 😶 query QPS at 16, delta to last 3 avg.: -1%

Breakdown

Version Index QPS Query QPS
current 1121 16
1.0.4 1098 16
1.0.3 1087 16

Backed by latency-tracking. Further commits will update this comment.

@Yongxuanzhang Yongxuanzhang marked this pull request as ready for review February 25, 2021 01:15
@Yongxuanzhang Yongxuanzhang requested a review from a team as a code owner February 25, 2021 01:15
@hanxiao hanxiao merged commit 665d2b0 into master Feb 25, 2021
@hanxiao hanxiao deleted the test-checker branch February 25, 2021 06:28
tmp_exec_driver = os.path.join(str(tmpdir), 'tmp_driver.yml')
args.summary_exec = tmp_exec_file
args.summary_driver = tmp_exec_driver
ImportChecker(args)
Copy link
Member

Choose a reason for hiding this comment

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

what is being tested here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to test ImportChecker from checker.py and _print_dep_tree_rst from importer.py. ImportChecker will call _print_dep_tree_rst to write executors and drivers to tmp files.
What could be the best practice do you think to test it?
Like, assert the content in text files? Or is it possible to use mock?

Copy link
Member

Choose a reason for hiding this comment

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

did not u say it is not used anywhere?

U could do check a little the text file or use a mock and see the arguments passed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought it's a private function, but actually, it's used outside of that file. And usually, we will do Jina check without these summary_exec, summary_driver. I think that's the reason they are not tested before. But they offer the ability to output executors, drivers to files.

Copy link
Member

Choose a reason for hiding this comment

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

so lets test the output of the functionality

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Will do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing This issue/PR affects testing size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants