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 address util test for loopback of ipv6 #1095

Merged
merged 2 commits into from
Oct 22, 2021

Conversation

srknzl
Copy link
Member

@srknzl srknzl commented Oct 21, 2021

On some systems dns.lookup will return ipv6 ip address. I fix the test by changing assertion to assert ip is either ipv6 loopback address or ipv4 loopback address.

Also I realized that the eslint config line-break makes it really hard to work on windows. There are a lot of warning in the open file while writing code. So I deleted it.

I am not sure if the resolveAddress method should return only ipv4, I don't think so.

Example fail https://github.com/hazelcast/hazelcast-nodejs-client/runs/3958991705?check_suite_focus=true

Seems like with node 17 dns lookup returns ipv6 loopback when localhost is given.

@srknzl srknzl added this to the 5.1 milestone Oct 21, 2021
@srknzl srknzl requested a review from mdumandag October 21, 2021 07:44
@codecov
Copy link

codecov bot commented Oct 21, 2021

Codecov Report

Merging #1095 (0623d59) into master (54df567) will decrease coverage by 0.22%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1095      +/-   ##
==========================================
- Coverage   92.43%   92.20%   -0.23%     
==========================================
  Files         433      433              
  Lines       14428    14428              
  Branches     1048     1048              
==========================================
- Hits        13337    13304      -33     
- Misses        808      840      +32     
- Partials      283      284       +1     
Impacted Files Coverage Δ
src/network/ConnectionManager.ts 76.15% <0.00%> (-6.33%) ⬇️
src/config/ConfigBuilder.ts 93.43% <0.00%> (-2.32%) ⬇️
src/invocation/ClusterService.ts 94.87% <0.00%> (-0.86%) ⬇️
src/util/Util.ts 87.58% <0.00%> (-0.66%) ⬇️
src/proxy/MultiMapProxy.ts 97.12% <0.00%> (+0.71%) ⬆️

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 54df567...0623d59. Read the comment docs.

@srknzl
Copy link
Member Author

srknzl commented Oct 21, 2021

verify

Copy link
Contributor

@mdumandag mdumandag left a comment

Choose a reason for hiding this comment

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

approving with minor comments

test/unit/util/AddressUtilTest.js Outdated Show resolved Hide resolved
test/unit/util/AddressUtilTest.js Outdated Show resolved Hide resolved
Co-authored-by: Metin Dumandag <metindumandag@gmail.com>
@srknzl srknzl merged commit 67d24cf into hazelcast:master Oct 22, 2021
srknzl added a commit to srknzl/hazelcast-nodejs-client that referenced this pull request Jan 31, 2022
* Fix address util test for loopback of ipv6

* Delete `.be` s

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>
srknzl added a commit to srknzl/hazelcast-nodejs-client that referenced this pull request Jan 31, 2022
* Fix address util test for loopback of ipv6

* Delete `.be` s

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>
srknzl added a commit to srknzl/hazelcast-nodejs-client that referenced this pull request Jan 31, 2022
* Fix address util test for loopback of ipv6

* Delete `.be` s

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>
srknzl added a commit to srknzl/hazelcast-nodejs-client that referenced this pull request Jan 31, 2022
* Fix address util test for loopback of ipv6

* Delete `.be` s

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>
srknzl added a commit that referenced this pull request Feb 21, 2022
* Fix address util test for loopback of ipv6 (#1095)

* Fix address util test for loopback of ipv6

* Delete `.be` s

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

* Add CI workflow

* Add chai as promised to addressutiltest

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>
srknzl added a commit that referenced this pull request Feb 21, 2022
* Fix address util test for loopback of ipv6

* Delete `.be` s

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>
srknzl added a commit that referenced this pull request Feb 21, 2022
* Fix address util test for loopback of ipv6 (#1095)

* Fix address util test for loopback of ipv6

* Delete `.be` s

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

* Add CI workflow

* Remove junit reporter and add chai as promised plugin to addressutiltest

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>
harunalpak pushed a commit to harunalpak/hazelcast-nodejs-client that referenced this pull request Dec 8, 2022
* Fix address util test for loopback of ipv6

* Delete `.be` s

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>
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.

None yet

2 participants