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 dialer test error #1784

Merged
merged 4 commits into from
Sep 8, 2022
Merged

Conversation

kevindiu
Copy link
Contributor

@kevindiu kevindiu commented Sep 7, 2022

Description:

SSIA

Related Issue:

How Has This Been Tested?:

Environment:

  • Go Version: 1.18.3
  • Docker Version: 20.10.8
  • Kubernetes Version: 1.22.0
  • NGT Version: 1.14.7

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 Sep 7, 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 main
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Base: 29.45% // Head: 30.31% // Increases project coverage by +0.86% 🎉

Coverage data is based on head (ce14f62) compared to base (1235535).
Patch has no changes to coverable lines.

Additional details and impacted files
@@                     Coverage Diff                     @@
##           test/fix-race-from-1728    #1784      +/-   ##
===========================================================
+ Coverage                    29.45%   30.31%   +0.86%     
===========================================================
  Files                          370      373       +3     
  Lines                        33295    33838     +543     
===========================================================
+ Hits                          9807    10258     +451     
- Misses                       23103    23173      +70     
- Partials                       385      407      +22     
Impacted Files Coverage Δ
...ent/core/ngt/service/vqueue/undeleted_index_map.go 68.33% <0.00%> (-2.78%) ⬇️
internal/worker/queue.go 98.73% <0.00%> (-1.27%) ⬇️
internal/errgroup/group.go 94.00% <0.00%> (-1.00%) ⬇️
internal/net/net.go 85.71% <0.00%> (ø)
internal/net/dialer.go 76.94% <0.00%> (ø)
internal/net/option.go 88.50% <0.00%> (ø)
internal/core/algorithm/ngt/ngt.go 63.93% <0.00%> (+0.64%) ⬆️
internal/worker/worker.go 83.07% <0.00%> (+0.76%) ⬆️
pkg/agent/core/ngt/service/option.go 91.41% <0.00%> (+1.84%) ⬆️
...nt/core/ngt/service/vqueue/uninserted_index_map.go 73.22% <0.00%> (+4.91%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

internal/net/dialer_test.go Outdated Show resolved Hide resolved
internal/net/dialer_test.go Outdated Show resolved Hide resolved
internal/net/dialer_test.go Outdated Show resolved Hide resolved
internal/net/dialer_test.go Show resolved Hide resolved
internal/net/dialer_test.go Show resolved Hide resolved
internal/net/dialer_test.go Outdated Show resolved Hide resolved
internal/net/dialer_test.go Outdated Show resolved Hide resolved
internal/net/dialer_test.go Outdated Show resolved Hide resolved
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 8, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: ce14f62
Status: ✅  Deploy successful!
Preview URL: https://9b2daa01.vald.pages.dev
Branch Preview URL: https://test-fix-dialer-test-fail.vald.pages.dev

View logs

@kevindiu kevindiu marked this pull request as ready for review September 8, 2022 02:04
@kevindiu kevindiu changed the title [WIP] Fix dialer test error Fix dialer test error Sep 8, 2022
@kevindiu kevindiu requested a review from kpango September 8, 2022 02:04
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 kpango merged commit 5d565e8 into test/fix-race-from-1728 Sep 8, 2022
@kpango kpango deleted the test/fix-dialer-test-fail branch September 8, 2022 02:16
@@ -950,7 +958,7 @@ func Test_dialer_cachedDialer(t *testing.T) {
}
return nil
},
afterFunc: func(args) {
afterFunc: func(t *testing.T) {
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 🐶
test helper function should start from t.Helper() (thelper)

},
beforeFunc: func(a args) {
beforeFunc: func(t *testing.T) {
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 🐶
test helper function should start from t.Helper() (thelper)

checkFunc: func(w want, c *tls.Conn, err error) error {
if err == nil {
return errors.New("Handshake completed even server has been gone")
}
return nil
},
afterFunc: func(a args) {
afterFunc: func(t1 *testing.T) {
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 🐶
parameter *testing.T should have name t (thelper)

kpango added a commit that referenced this pull request Sep 8, 2022
* fix test error for PR#1768

Signed-off-by: kpango <[email protected]>

* fix index test build error

Signed-off-by: kevindiu <[email protected]>

* regenerate backup files to fix info test error

Signed-off-by: kevindiu <[email protected]>

* disable log for save index test to avoid error log

Signed-off-by: kevindiu <[email protected]>

* fix info test by correct branch name & fix Get() impl

Signed-off-by: kevindiu <[email protected]>

* Fix dialer test error (#1784)

* fix dialer test error

Signed-off-by: kevindiu <[email protected]>

* revert unnecessary changes

Signed-off-by: kevindiu <[email protected]>

* correct dialer test impl

Signed-off-by: kevindiu <[email protected]>

* Fix formatter

Signed-off-by: kevindiu <[email protected]>

* fix comment

Signed-off-by: kevindiu <[email protected]>

* remove backup file for test

Signed-off-by: kevindiu <[email protected]>

Signed-off-by: kpango <[email protected]>
Signed-off-by: kevindiu <[email protected]>
Co-authored-by: kpango <[email protected]>
kpango added a commit that referenced this pull request Sep 8, 2022
* fix test error for PR#1768

Signed-off-by: kpango <[email protected]>

* fix index test build error

Signed-off-by: kevindiu <[email protected]>

* regenerate backup files to fix info test error

Signed-off-by: kevindiu <[email protected]>

* disable log for save index test to avoid error log

Signed-off-by: kevindiu <[email protected]>

* fix info test by correct branch name & fix Get() impl

Signed-off-by: kevindiu <[email protected]>

* Fix dialer test error (#1784)

* fix dialer test error

Signed-off-by: kevindiu <[email protected]>

* revert unnecessary changes

Signed-off-by: kevindiu <[email protected]>

* correct dialer test impl

Signed-off-by: kevindiu <[email protected]>

* Fix formatter

Signed-off-by: kevindiu <[email protected]>

* fix comment

Signed-off-by: kevindiu <[email protected]>

* remove backup file for test

Signed-off-by: kevindiu <[email protected]>

Signed-off-by: kpango <[email protected]>
Signed-off-by: kevindiu <[email protected]>
Co-authored-by: kpango <[email protected]>
Signed-off-by: kpango <[email protected]>
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.

3 participants