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

Refactor pkg test helper functions #1678

Merged
merged 29 commits into from
Jun 2, 2022

Conversation

kevindiu
Copy link
Contributor

Description:

This PR refactor pkg/agent/handler test implementation.
The changes and the discussion is as the following link:
#1675

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.18.2
  • Docker Version: 20.10.8
  • Kubernetes Version: 1.22.0
  • NGT Version: 1.14.5

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@kevindiu kevindiu force-pushed the refactor/test/separate-pkg-test-helper branch from adb6d0c to 8d3bbab Compare May 25, 2022 06:20
@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #1678 (c477b85) into master (815b44a) will increase coverage by 0.21%.
The diff coverage is 89.77%.

@@            Coverage Diff             @@
##           master    #1678      +/-   ##
==========================================
+ Coverage   31.16%   31.37%   +0.21%     
==========================================
  Files         372      374       +2     
  Lines       32503    32591      +88     
==========================================
+ Hits        10130    10226      +96     
+ Misses      21993    21984       -9     
- Partials      380      381       +1     
Impacted Files Coverage Δ
internal/test/data/vector/gen.go 93.40% <77.77%> (-6.60%) ⬇️
internal/test/data/request/insert.go 92.10% <92.10%> (ø)
internal/conv/conv.go 76.66% <100.00%> (+11.66%) ⬆️
internal/test/data/request/object.go 100.00% <100.00%> (ø)
pkg/agent/core/ngt/service/option.go 89.57% <0.00%> (-1.85%) ⬇️
internal/worker/queue.go 98.73% <0.00%> (-1.27%) ⬇️
internal/worker/worker.go 84.37% <0.00%> (+0.78%) ⬆️
...nt/core/ngt/service/vqueue/uninserted_index_map.go 78.68% <0.00%> (+5.46%) ⬆️
...ent/core/ngt/service/vqueue/undeleted_index_map.go 76.66% <0.00%> (+5.55%) ⬆️

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 815b44a...c477b85. Read the comment docs.

@kpango kpango marked this pull request as draft May 25, 2022 07:05
@kpango kpango changed the title Refactor pkg test helper functions [WIP] Refactor pkg test helper functions May 25, 2022
internal/test/data/charset/convert.go Outdated Show resolved Hide resolved
internal/test/data/request/insert.go Show resolved Hide resolved
internal/test/data/request/object.go Outdated Show resolved Hide resolved
internal/test/data/vector/gen.go Outdated Show resolved Hide resolved
pkg/agent/core/ngt/handler/grpc/handler_test.go Outdated Show resolved Hide resolved
pkg/agent/core/ngt/handler/grpc/handler_test.go Outdated Show resolved Hide resolved
pkg/agent/core/ngt/handler/grpc/handler_test.go Outdated Show resolved Hide resolved
pkg/agent/core/ngt/handler/grpc/handler_test.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added size/XXL and removed size/XL labels May 31, 2022
@kevindiu
Copy link
Contributor Author

kevindiu commented Jun 1, 2022

/format

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Jun 1, 2022

[FORMAT] Updating license headers and formatting go codes triggered by kevindiu.

@kevindiu kevindiu marked this pull request as ready for review June 1, 2022 01:56
@kevindiu kevindiu changed the title [WIP] Refactor pkg test helper functions Refactor pkg test helper functions Jun 1, 2022
@kevindiu kevindiu requested review from kmrmt and vankichi June 1, 2022 01:56
pkg/agent/core/ngt/handler/grpc/handler_test.go Outdated Show resolved Hide resolved
internal/test/data/request/insert.go Show resolved Hide resolved
internal/test/data/request/object.go Show resolved Hide resolved
internal/test/data/request/object.go Outdated Show resolved Hide resolved
internal/test/data/vector/gen.go Outdated Show resolved Hide resolved
internal/test/data/request/object.go Outdated Show resolved Hide resolved
internal/conv/conv.go Outdated Show resolved Hide resolved
@kevindiu kevindiu requested a review from vankichi June 1, 2022 07:11
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
@kevindiu kevindiu force-pushed the refactor/test/separate-pkg-test-helper branch from b70cf9d to c203493 Compare June 1, 2022 09:22
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
internal/conv/conv.go Outdated Show resolved Hide resolved
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
@kevindiu kevindiu requested a review from vankichi June 2, 2022 01:26
@kevindiu kevindiu requested a review from vankichi June 2, 2022 01:51
internal/conv/conv_test.go Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
internal/conv/conv_test.go Outdated Show resolved Hide resolved
internal/conv/conv_test.go Outdated Show resolved Hide resolved
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
@kevindiu kevindiu requested a review from vankichi June 2, 2022 07:09
@vankichi vankichi merged commit 626c706 into master Jun 2, 2022
@vankichi vankichi deleted the refactor/test/separate-pkg-test-helper branch June 2, 2022 08:27
@hlts2 hlts2 mentioned this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants