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

Implement stream insert test case #1697

Merged
merged 13 commits into from
Jun 23, 2022

Conversation

kevindiu
Copy link
Contributor

@kevindiu kevindiu commented Jun 8, 2022

Signed-off-by: kevindiu kevindiujp@gmail.com

Description:

This PR implements stream insert test for pkg/agent/ngt/handler.
It also implements server stream mock for testing.

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.

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Jun 8, 2022

[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 Jun 8, 2022

Codecov Report

Merging #1697 (3bce657) into master (a41df5e) will increase coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1697      +/-   ##
==========================================
+ Coverage   31.48%   31.59%   +0.10%     
==========================================
  Files         385      385              
  Lines       32676    32691      +15     
==========================================
+ Hits        10288    10328      +40     
+ Misses      21997    21970      -27     
- Partials      391      393       +2     
Impacted Files Coverage Δ
internal/test/data/request/object.go 100.00% <100.00%> (ø)
internal/worker/worker.go 83.59% <0.00%> (-1.57%) ⬇️
internal/worker/queue.go 98.73% <0.00%> (-1.27%) ⬇️
internal/core/algorithm/ngt/ngt.go 64.70% <0.00%> (-0.66%) ⬇️
...ent/core/ngt/service/vqueue/undeleted_index_map.go 71.11% <0.00%> (+2.77%) ⬆️
pkg/agent/core/ngt/handler/grpc/insert.go 73.33% <0.00%> (+11.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 a41df5e...3bce657. Read the comment docs.

@github-actions github-actions bot added size/XL and removed size/L labels Jun 20, 2022
@github-actions github-actions bot added size/XXL and removed size/XL labels Jun 20, 2022
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
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 test/pkg/add-pkg-agent-handler-stream-insert-test branch from e0efa83 to aa14d32 Compare June 20, 2022 08:05
@kevindiu kevindiu marked this pull request as ready for review June 20, 2022 08:22
@kevindiu kevindiu changed the title [WIP] Implement stream insert test case Implement stream insert test case Jun 20, 2022
@kevindiu kevindiu requested review from a team and hlts2 and removed request for kmrmt and a team June 20, 2022 08:23
Signed-off-by: kevindiu <kevindiujp@gmail.com>
@kevindiu kevindiu merged commit a7e6c5d into master Jun 23, 2022
@kevindiu kevindiu deleted the test/pkg/add-pkg-agent-handler-stream-insert-test branch June 23, 2022 04:09
kevindiu added a commit that referenced this pull request Jul 4, 2022
* add stream insert test case

Signed-off-by: kevindiu <kevindiujp@gmail.com>

* update stream insert test case

Signed-off-by: kevindiu <kevindiujp@gmail.com>

* implement server stream mock

Signed-off-by: kevindiu <kevindiujp@gmail.com>

* test implementation

Signed-off-by: kevindiu <kevindiujp@gmail.com>

* impl equivalence class test cases

Signed-off-by: kevindiu <kevindiujp@gmail.com>

* implement boundary value test cases

Signed-off-by: kevindiu <kevindiujp@gmail.com>

* implement decision table tests

Signed-off-by: kevindiu <kevindiujp@gmail.com>

* fix gofumpt

Signed-off-by: kevindiu <kevindiujp@gmail.com>

* add genObjectStreamLocation tests

Signed-off-by: kevindiu <kevindiujp@gmail.com>

* fix

Signed-off-by: kevindiu <kevindiujp@gmail.com>

* Update internal/test/data/request/object_test.go

* use const for default uuid

Signed-off-by: kevindiu <kevindiujp@gmail.com>
@kevindiu kevindiu mentioned this pull request Jul 4, 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