fix: align ip version preference for the wrapped emulator#1052
fix: align ip version preference for the wrapped emulator#1052mutianf merged 4 commits intogoogleapis:mainfrom
Conversation
When the emulator wrapper is started with -Djava.net.preferIPv6Addresses=true on a machine that defaults to ipv4, the golang emulator and the java client will pick different ip stacks and not be able to connect. This change will use java to resolve the localhost's ip address and push it down to the golang emulator
| private static int getAvailablePort() { | ||
| try { | ||
| InetAddress moo = InetAddress.getByName(null); | ||
| System.out.println(moo); |
There was a problem hiding this comment.
looks like some cleanup needed here?
There was a problem hiding this comment.
well thats just embarrassing 😳
There was a problem hiding this comment.
should be good now
kolea2
left a comment
There was a problem hiding this comment.
Can we add a test with that system property at both true and false to ensure it passes?
|
We basically have those tests already ... mac os kokoro jobs set the flag and everything else doesnt. And I dont think its worth adding more kokoro jobs for this |
...le-cloud-bigtable-emulator/src/main/java/com/google/cloud/bigtable/emulator/v2/Emulator.java
Outdated
Show resolved
Hide resolved
|
Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot. |
🤖 I have created a release \*beep\* \*boop\* --- ## [2.5.0](https://www.github.com/googleapis/java-bigtable/compare/v2.4.0...v2.5.0) (2022-01-05) ### Features * add batch throttled ms metric ([#888](https://www.github.com/googleapis/java-bigtable/issues/888)) ([0d197a5](https://www.github.com/googleapis/java-bigtable/commit/0d197a5ab9b7ccd20091c1c6c4a794586d6a51dc)) * ARM support for gcloud bigtable emulator ([#1094](https://www.github.com/googleapis/java-bigtable/issues/1094)) ([d3cb4a4](https://www.github.com/googleapis/java-bigtable/commit/d3cb4a4e03ae0f7e065bfee06ac8e3b86b447a4a)) ### Bug Fixes * align ip version preference for the wrapped emulator ([#1052](https://www.github.com/googleapis/java-bigtable/issues/1052)) ([9dc93c5](https://www.github.com/googleapis/java-bigtable/commit/9dc93c5c9372f1501006e2d3a3a7affecd65fb8e)) * remove stats from javadoc ([#1108](https://www.github.com/googleapis/java-bigtable/issues/1108)) ([33fe7fe](https://www.github.com/googleapis/java-bigtable/commit/33fe7fe162cf84339e1887b052e446ef0aaf19d6)) * remove tracking latency from channel priming requests ([#1082](https://www.github.com/googleapis/java-bigtable/issues/1082)) ([bd873bc](https://www.github.com/googleapis/java-bigtable/commit/bd873bc82f0b210312fd442678c801758291935e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
…#1052) * fix: align ip version preference for the wrapped emulator When the emulator wrapper is started with -Djava.net.preferIPv6Addresses=true on a machine that defaults to ipv4, the golang emulator and the java client will pick different ip stacks and not be able to connect. This change will use java to resolve the localhost's ip address and push it down to the golang emulator * remove debug * whitespace
🤖 I have created a release \*beep\* \*boop\* --- ## [2.5.0](https://www.github.com/googleapis/java-bigtable/compare/v2.4.0...v2.5.0) (2022-01-05) ### Features * add batch throttled ms metric ([googleapis#888](https://www.github.com/googleapis/java-bigtable/issues/888)) ([0d197a5](https://www.github.com/googleapis/java-bigtable/commit/0d197a5ab9b7ccd20091c1c6c4a794586d6a51dc)) * ARM support for gcloud bigtable emulator ([googleapis#1094](https://www.github.com/googleapis/java-bigtable/issues/1094)) ([d3cb4a4](https://www.github.com/googleapis/java-bigtable/commit/d3cb4a4e03ae0f7e065bfee06ac8e3b86b447a4a)) ### Bug Fixes * align ip version preference for the wrapped emulator ([googleapis#1052](https://www.github.com/googleapis/java-bigtable/issues/1052)) ([9dc93c5](https://www.github.com/googleapis/java-bigtable/commit/9dc93c5c9372f1501006e2d3a3a7affecd65fb8e)) * remove stats from javadoc ([googleapis#1108](https://www.github.com/googleapis/java-bigtable/issues/1108)) ([33fe7fe](https://www.github.com/googleapis/java-bigtable/commit/33fe7fe162cf84339e1887b052e446ef0aaf19d6)) * remove tracking latency from channel priming requests ([googleapis#1082](https://www.github.com/googleapis/java-bigtable/issues/1082)) ([bd873bc](https://www.github.com/googleapis/java-bigtable/commit/bd873bc82f0b210312fd442678c801758291935e)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
When the emulator wrapper is started with -Djava.net.preferIPv6Addresses=true on a machine that defaults to ipv4,
the golang emulator and the java client will pick different ip stacks and not be able to connect. This change will
use java to resolve the localhost's ip address and push it down to the golang emulator