-
Notifications
You must be signed in to change notification settings - Fork 31
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
Removed the unused profile and resource. #2058
Removed the unused profile and resource. #2058
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, in my local environment one test is failing after this change:
[ERROR] Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.170 s <<< FAILURE! -- in io.hyperfoil.tools.horreum.svc.UtilTest
[ERROR] io.hyperfoil.tools.horreum.svc.UtilTest.evaluateOnceAsyncAwaitFetchJson -- Time elapsed: 0.013 s <<< FAILURE!
org.opentest4j.AssertionFailedError: Cannot assign requested address
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:38)
at org.junit.jupiter.api.Assertions.fail(Assertions.java:138)
at io.hyperfoil.tools.horreum.svc.UtilTest.evaluateOnceAsyncAwaitFetchJson(UtilTest.java:248)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] UtilTest.evaluateOnceAsyncAwaitFetchJson:248 Cannot assign requested address
[INFO]
[ERROR] Tests run: 6, Failures: 1, Errors: 0, Skipped: 0
@whitingjr are you experiencing the same in your local env?
When I tested it yesterday I did not. |
Just tested again and the tests passed.
The http server is started on an ephemeral port. Were you just unlucky getting a collision and another attempt passes ? |
it seems deterministic in my case, I was not able to get it working yet.. it keeps failing on every attempt 😢 |
I was able to get it working but I had to change the server initialization to: httpServer = HttpServer.create(new InetSocketAddress(0), 0); i.e., removing the explicit hostname. [edit] this is the diff: - httpServer = HttpServer.create(new InetSocketAddress(InetAddress.getLocalHost().getHostName(), 0), 0); // or use InetSocketAddress(0) for ephemeral port
+ httpServer = HttpServer.create(new InetSocketAddress(0), 0); |
@willr3 is this a test for a feature we are not supporting in Horreum atm? can we disable it? |
UtilTest.evaluateOnceAsyncAwaitFetchJson is a test that ensures async functions do not execute fetch |
Ok, so we need to make sure it works in all environments, or at least understand why the current impl does not work in @lampajr environment |
Not sure what is actually not working and why yet, but with the change I shared here #2058 (comment) I can confirm it works in my env! |
@lampajr can you share basic details (platform, version, jdk version) of your system ? |
$ cat /etc/redhat-release
Fedora release 40 (Forty)
$ java -version
openjdk version "17.0.11" 2024-04-16
OpenJDK Runtime Environment Temurin-17.0.11+9 (build 17.0.11+9)
OpenJDK 64-Bit Server VM Temurin-17.0.11+9 (build 17.0.11+9, mixed mode, sharing) |
@lampajr I tested this using the same set-up using a F40 VM and the Horreum test-suite including UtilTest passes all 6 tests. I cannot replicate the issue. It seems the interface 0.0.0.0 on any port is unavailable with v4, causing the error. Can you try using v6 with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok looks like it is working now, don't know what was wrong the last time 🫤
LGTM @whitingjr!
Fixes Issue
Related to #2039
Changes proposed
Check List (Check all the applicable boxes)