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

Fix failed test case of internal/safety package #464

Merged
merged 10 commits into from
Jun 15, 2020
Merged

Conversation

kevindiu
Copy link
Contributor

Description:

This PR fix the failed test case in internal/safety package.

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.14.3
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.11.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.

@pull-assistant
Copy link

pull-assistant bot commented Jun 10, 2020

Score: 0.72

Best reviewed: commit by commit


Optimal code review plan (2 warnings, 2 commits squashed)

     fix test case

     fix

     genereate missing test code

add coding doc ... fix doc

Squashed 2 commits:

...s/contributing/coding-style.md 62% changes removed in fix formatting

     Apply suggestions from code review

Apply suggestions from code review

...s/contributing/coding-style.md 71% changes removed in add title

     Apply suggestions from code review

     fix formatting

     add title

Powered by Pull Assistant. Last update bfa2efd ... 60bb2fb. Read the comment docs.

@kevindiu
Copy link
Contributor Author

/format
/rebase

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by kevindiu for branch: test/internal/safety

@vdaas-ci
Copy link
Collaborator

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

@vdaas-ci
Copy link
Collaborator

[FORMAT] Failed to format.

@codecov
Copy link

codecov bot commented Jun 10, 2020

Codecov Report

Merging #464 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #464   +/-   ##
======================================
  Coverage    7.83%   7.83%           
======================================
  Files         396     396           
  Lines       20322   20322           
======================================
  Hits         1593    1593           
  Misses      18492   18492           
  Partials      237     237           

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 972e943...60bb2fb. Read the comment docs.

hlts2
hlts2 previously approved these changes Jun 10, 2020
Copy link
Contributor

@hlts2 hlts2 left a comment

Choose a reason for hiding this comment

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

Thank you for your PR:bow:
LGTM

@kevindiu kevindiu marked this pull request as ready for review June 10, 2020 08:25
@kevindiu kevindiu requested a review from vankichi June 10, 2020 08:25
@kevindiu kevindiu changed the title [Draft] Test/internal/safety Test/internal/safety Jun 10, 2020
@kevindiu kevindiu changed the title Test/internal/safety Fix failed test case of internal/safety package Jun 10, 2020
@vankichi
Copy link
Contributor

/rebase

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: test/internal/safety

vankichi
vankichi previously approved these changes Jun 11, 2020
Copy link
Contributor

@vankichi vankichi left a comment

Choose a reason for hiding this comment

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

LGTM

@vankichi
Copy link
Contributor

/approve
/rebase
/approve

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: test/internal/safety

vdaas-ci
vdaas-ci previously approved these changes Jun 11, 2020
Copy link
Collaborator

@vdaas-ci vdaas-ci left a comment

Choose a reason for hiding this comment

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

[APPROVED] This PR is approved by vankichi.

@vankichi
Copy link
Contributor

/rebase

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by vankichi for branch: test/internal/safety

@vdaas-ci vdaas-ci dismissed stale reviews from vankichi and themself via 99895a7 June 11, 2020 05:43
Copy link
Contributor

@vankichi vankichi left a comment

Choose a reason for hiding this comment

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

@kevindiu I left some suggestions. please check it.
I suggest you one sentence in a line would be better. (We can check difference easy if there are some changes in another PRs. )

docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
docs/contributing/coding-style.md Outdated Show resolved Hide resolved
@@ -24,65 +24,138 @@ import (
"go.uber.org/goleak"
)

var (
// Goroutine leak is detected by `fastime`, but it should be ignored in the test because it is an external package.
goleakIgnoreOptions = []goleak.Option{
Copy link
Contributor

Choose a reason for hiding this comment

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

[golangci] reported by reviewdog 🐶
goleakIgnoreOptions is a global variable (gochecknoglobals)

hlts2
hlts2 previously approved these changes Jun 15, 2020
Copy link
Contributor

@hlts2 hlts2 left a comment

Choose a reason for hiding this comment

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

LGTM

vankichi
vankichi previously approved these changes Jun 15, 2020
Copy link
Contributor

@vankichi vankichi left a comment

Choose a reason for hiding this comment

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

LGTM

@kevindiu kevindiu requested a review from kpango June 15, 2020 06:55
@kevindiu
Copy link
Contributor Author

@kpango This PR implements the test case of internal/safety test cases.
Since this PR customized the testing code by adding the defer() function to test the recover() result.
I think the similar test case may exists on other packages, I think it is better for you to review this changes.

I added the following code to the test code:
Line 27-36: https://github.com/vdaas/vald/pull/464/files#diff-d24e608c08457561fd4b754590a38847R27-R36
Line 44: https://github.com/vdaas/vald/pull/464/files#diff-d24e608c08457561fd4b754590a38847R44
Line 131-144: https://github.com/vdaas/vald/pull/464/files#diff-d24e608c08457561fd4b754590a38847R131-R144

It is not urgent but can you please review it in this week (6/19)?

@kevindiu
Copy link
Contributor Author

/rebase

@vdaas-ci
Copy link
Collaborator

[REBASE] Rebase triggered by kevindiu for branch: test/internal/safety

kevindiu and others added 10 commits June 15, 2020 07:23
Co-authored-by: Hiroto Funakoshi <hiroto.funakoshi.hiroto@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
@vdaas-ci vdaas-ci dismissed stale reviews from vankichi and hlts2 via 60bb2fb June 15, 2020 07:23
Copy link
Collaborator

@kpango kpango left a comment

Choose a reason for hiding this comment

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

LGTM

@kpango
Copy link
Collaborator

kpango commented Jun 15, 2020

/format
/approve

@vdaas-ci
Copy link
Collaborator

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

Copy link
Collaborator

@vdaas-ci vdaas-ci left a comment

Choose a reason for hiding this comment

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

[APPROVED] This PR is approved by kpango.

@kpango kpango merged commit 32a86e3 into master Jun 15, 2020
@kpango kpango deleted the test/internal/safety branch June 15, 2020 07:36
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.

5 participants