-
Notifications
You must be signed in to change notification settings - Fork 436
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
refactor (jkube-kit/common) : Refactor IoUtil.getFreeRandomPort
to always generate a valid free random port (#2501)
#2641
Conversation
Eclipse JKube CI ReportStarted new GH workflow run for #2641 (2024-02-08T13:38:17Z) ⚙️ JKube E2E Tests (7830367131)
|
We're bumping into same issue as #2576 on Eclipse Jenkins due to usage of ServerSocket.
I'm not able to reproduce this failure locally with JDK I'm disabling this test on JDK8 |
…always generate a valid free random port (eclipse-jkube#2501) + Use ServerSocket to establish a connection instead of Socket which might also throw ConnectException for a socket already in use. + Modify IoUtilTes.findOpenPortWithSmallAttemptsCount to use `@RepeatedTest` annotation to run it 500 times Signed-off-by: Rohan Kumar <rohaan@redhat.com>
8d76acc
to
753d2ef
Compare
@@ -64,7 +67,7 @@ void findOpenPortWhenPortsAreBusy() throws IOException { | |||
assertThat(port2).isGreaterThan(port); | |||
} | |||
|
|||
@Test | |||
@RepeatedTest(500) |
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.
Is this intentional?
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.
Issue is not reproducible on single run, Running it multiple times reproduces the issue. This @RepeatedTest(500)
verifies that test passes with new changes.
Quality Gate passedIssues Measures |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2641 +/- ##
=============================================
+ Coverage 59.36% 70.42% +11.05%
- Complexity 4586 4992 +406
=============================================
Files 500 486 -14
Lines 21211 19446 -1765
Branches 2830 2504 -326
=============================================
+ Hits 12591 13694 +1103
+ Misses 7370 4526 -2844
+ Partials 1250 1226 -24 ☔ View full report in Codecov by Sentry. |
Description
Fixes #2501
@RepeatedTest
annotation to run it 500 timesType of change
test, version modification, documentation, etc.)
Checklist