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

Removed the unused profile and resource. #2058

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

whitingjr
Copy link
Collaborator

@whitingjr whitingjr commented Oct 3, 2024

Fixes Issue

Related to #2039

Changes proposed

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.

@whitingjr whitingjr requested a review from lampajr October 3, 2024 16:43
Copy link
Member

@lampajr lampajr left a 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?

@whitingjr
Copy link
Collaborator Author

@whitingjr are you experiencing the same in your local env?

When I tested it yesterday I did not.
I'll try again and make sure to clean the workspace beforehand.

@whitingjr
Copy link
Collaborator Author

Just tested again and the tests passed.

$ mvn  test -Dtest=UtilTest -Dsurefire.failIfNoSpecifiedTests=false
...
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.hyperfoil.tools.horreum.svc.UtilTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.808 s -- in io.hyperfoil.tools.horreum.svc.UtilTest
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0

The http server is started on an ephemeral port. Were you just unlucky getting a collision and another attempt passes ?

@lampajr
Copy link
Member

lampajr commented Oct 4, 2024

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 😢

@lampajr
Copy link
Member

lampajr commented Oct 4, 2024

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);

@johnaohara
Copy link
Member

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?

@willr3 is this a test for a feature we are not supporting in Horreum atm? can we disable it?

@willr3
Copy link
Collaborator

willr3 commented Oct 4, 2024

UtilTest.evaluateOnceAsyncAwaitFetchJson is a test that ensures async functions do not execute fetch

@johnaohara
Copy link
Member

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

@lampajr
Copy link
Member

lampajr commented Oct 5, 2024

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!

@whitingjr
Copy link
Collaborator Author

@lampajr can you share basic details (platform, version, jdk version) of your system ?

@lampajr
Copy link
Member

lampajr commented Oct 8, 2024

@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)

@whitingjr
Copy link
Collaborator Author

@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 -Djava.net.preferIPv4Stack=false ?

Copy link
Member

@lampajr lampajr left a 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!

@lampajr lampajr merged commit afb66bb into Hyperfoil:master Oct 10, 2024
3 checks passed
@whitingjr whitingjr deleted the horreum-remove-test-services branch October 10, 2024 10:31
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.

4 participants