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

Dualstack interop testing enablement #11231

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

larry-safran
Copy link
Contributor

@larry-safran larry-safran commented May 23, 2024

Fix flag string for enabling dual stack and give server ability to parse argument address_type

@larry-safran larry-safran requested review from ejona86 and removed request for sergiitk June 5, 2024 00:44
@@ -268,7 +267,7 @@ void setUp() {
tester.setUp();
}

private synchronized void tearDown() {
synchronized void tearDown() {
Copy link
Member

Choose a reason for hiding this comment

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

Why was this file changed? I don't see any usages of these changes.

InetAddress[] addresses = InetAddress.getAllByName(InetAddress.getLocalHost().getHostName());
for (InetAddress address : addresses) {
if (address.getAddress().length == 4) {
return new java.net.InetSocketAddress(address.getHostAddress(), port);
Copy link
Member

Choose a reason for hiding this comment

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

Pass address, like you did for IPv6. This will do a DNS lookup and can leave you with an IPV6 address.

@@ -130,11 +138,14 @@ void parseArgs(String[] args) {
+ "\n --local_handshaker_port=PORT"
+ "\n Use local ALTS handshaker service on the specified port "
+ "\n for testing. Only effective when --use_alts=true."
+ "\n --address_type=IPV4|IPV6|IPV4_IPV6"
Copy link
Member

Choose a reason for hiding this comment

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

@@ -162,11 +174,15 @@ private void parseArgs(String[] args) {
+ s.secureMode
+ "\n --server_id=STRING server ID for response."
+ "\n Default: "
+ s.serverId);
+ s.serverId
+ "\n --address_type=STRING type of IP address to bind to (IPV4|IPV6|IPV4_IPV6)."
Copy link
Member

Choose a reason for hiding this comment

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

@@ -108,58 +111,112 @@ public void allCommandlineSwitchesAreSupported() {
assertEquals(60, client.metricsLogRateSecs());
}

@Test
public void gaugesShouldBeExported_ipv4() throws Exception {
checkGaugesShouldBeExported(IPV4);
Copy link
Member

Choose a reason for hiding this comment

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

☹️, do we really need to check the gauges for all the different IP binding methods?

Is there any document describing why we are messing with the stress client?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because it is the only test that actually talks to a server over IP.

Copy link
Member

Choose a reason for hiding this comment

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

So make a new test? I don't follow. It doesn't even need a client; you could just open a TCP connection to see if the port is open, if you wanted.

What clued me in to this is the switch statement. We really want to avoid logic in tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants