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

Adapt to test on IPv6 #451

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Adapt to test on IPv6 #451

merged 1 commit into from
Jan 23, 2024

Conversation

imonteroperez
Copy link
Contributor

  • Current use of URL builder does not cover IPv6
  • If we run a test using this code on an IPv6 environment we will get the following exception
java.net.MalformedURLException: Error at index 0 in: "::37351"
	at java.base/java.net.URL.<init>(URL.java:679)
	at java.base/java.net.URL.<init>(URL.java:541)
	at java.base/java.net.URL.<init>(URL.java:488)
	at io.jenkins.plugins.artifact_manager_jclouds.MockBlobStore.getContext(MockBlobStore.java:144)
	at io.jenkins.plugins.artifact_manager_jclouds.NetworkTest.configureManager(NetworkTest.java:88)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:656)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.NumberFormatException: Error at index 0 in: "::37351"
	at java.base/java.lang.NumberFormatException.forCharSequence(NumberFormatException.java:81)
	at java.base/java.lang.Integer.parseInt(Integer.java:735)
	at java.base/java.net.URLStreamHandler.parseURL(URLStreamHandler.java:223)
	at java.base/java.net.URL.<init>(URL.java:674)
	... 8 more
  • This PR changes the URL builder invocation to a compliant one with both IPv4 and IPv6 addresses format

Testing done

  • Tested via PCT on an IPv6 environment and working as expected

Submitter checklist

Preview Give feedback

@aneveux
Copy link
Member

aneveux commented Jan 23, 2024

Hey @jglick 👋

It looks like you have the karma needed to merge this PR, can you please have a look? ❤️

@jglick jglick added the tests label Jan 23, 2024
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

@jglick jglick merged commit b0805c1 into jenkinsci:master Jan 23, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants