-
Notifications
You must be signed in to change notification settings - Fork 542
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
UnixSocketTest : Use try with resources while creating object #2676 #2680
UnixSocketTest : Use try with resources while creating object #2676 #2680
Conversation
Eclipse JKube CI ReportStarted new GH workflow run for #2680 (2024-02-16T10:43:21Z) ⚙️ JKube E2E Tests (7929322853)
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2680 +/- ##
=============================================
+ Coverage 59.36% 70.48% +11.11%
- Complexity 4586 4998 +412
=============================================
Files 500 486 -14
Lines 21211 19458 -1753
Branches 2830 2504 -326
=============================================
+ Hits 12591 13714 +1123
+ Misses 7370 4519 -2851
+ Partials 1250 1225 -25 ☔ View full report in Codecov by Sentry. |
UnixSocket unixSocket = new UnixSocket(); | ||
doReturn(KEEP_ALIVE).when(socket).getKeepAlive(); | ||
doReturn(SO_TIMEOUT).when(socket).getSoTimeout(); | ||
try(UnixSocket unixSocket = new UnixSocket()){ |
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.
try(UnixSocket unixSocket = new UnixSocket()){ | |
try (UnixSocket unixSocket = new UnixSocket()) { |
UnixSocket unixSocket = new UnixSocket(); | ||
doThrow(new SocketException()).when(socket).getKeepAlive(); | ||
doThrow(new SocketException()).when(socket).getSoTimeout(); | ||
try(UnixSocket unixSocket = new UnixSocket()){ |
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.
try(UnixSocket unixSocket = new UnixSocket()){ | |
try (UnixSocket unixSocket = new UnixSocket()) { |
} | ||
|
||
@Test | ||
void shouldForwardValuesToSocket() throws IOException { | ||
// GIVEN | ||
UnixSocket unixSocket = new UnixSocket(); | ||
try(UnixSocket unixSocket = new UnixSocket()){ |
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.
try(UnixSocket unixSocket = new UnixSocket()){ | |
try (UnixSocket unixSocket = new UnixSocket()) { |
…-jkube#2676 UnixSocketTest : Use try with resources while creating object eclipse-jkube#2676 Refactor UnixSocketTest to use try-with-resources for UnixSocket objects
8601f69
to
1c651ec
Compare
|
Description
Fix #2676
Refactor UnixSocketTest to use try-with-resources for UnixSocket objects
Type of change
test, version modification, documentation, etc.)
Checklist