Skip to content

Get local host name before opening TDSChannel#324

Merged
Suraiya-Hameed merged 4 commits intomicrosoft:RTW_6.2.0from
Suraiya-Hameed:getLocalHostName_unix
Jun 12, 2017
Merged

Get local host name before opening TDSChannel#324
Suraiya-Hameed merged 4 commits intomicrosoft:RTW_6.2.0from
Suraiya-Hameed:getLocalHostName_unix

Conversation

@Suraiya-Hameed
Copy link
Copy Markdown
Contributor

Fixes #177

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 1, 2017

Codecov Report

Merging #324 into RTW_6.2.0 will decrease coverage by 0.01%.
The diff coverage is 75%.

Impacted file tree graph

@@               Coverage Diff               @@
##             RTW_6.2.0     #324      +/-   ##
===============================================
- Coverage        37.17%   37.15%   -0.02%     
+ Complexity        1670     1666       -4     
===============================================
  Files              103      103              
  Lines            23663    23664       +1     
  Branches          3918     3918              
===============================================
- Hits              8796     8793       -3     
  Misses           13278    13278              
- Partials          1589     1593       +4
Flag Coverage Δ Complexity Δ
#JDBC41 36.98% <75%> (-0.06%) 1655 <0> (-9)
#JDBC42 37.03% <75%> (-0.02%) 1660 <0> (ø)
Impacted Files Coverage Δ Complexity Δ
.../microsoft/sqlserver/jdbc/SQLServerConnection.java 43.17% <75%> (+0.02%) 252 <0> (ø) ⬇️
src/main/java/microsoft/sql/DateTimeOffset.java 37.14% <0%> (-2.86%) 8% <0%> (-2%)
...om/microsoft/sqlserver/jdbc/SimpleInputStream.java 47.4% <0%> (-1.49%) 9% <0%> (-1%)
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 29.43% <0%> (-0.68%) 56% <0%> (ø)
...oft/sqlserver/jdbc/SQLServerPreparedStatement.java 33.45% <0%> (-0.18%) 89% <0%> (-1%)
...om/microsoft/sqlserver/jdbc/ReaderInputStream.java 46.06% <0%> (ø) 17% <0%> (ø) ⬇️
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 45.98% <0%> (+0.1%) 0% <0%> (ø) ⬇️
...om/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java 48.93% <0%> (+0.14%) 210% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d8f677e...903864a. Read the comment docs.

}

// Before opening the TDSChannel, calculate local hostname
// as the InetAddress.getLocalHost() takes more than usual time in certian OS and JVM combination, it avoids connection loss
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: I think it should be good if we mention that in Sierra getLocalHost takes lot of time.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: As you are moving condition we can reduce complexity by 1 by using StringUtils.isEmpty()

@Suraiya-Hameed Suraiya-Hameed merged commit 1da02b5 into microsoft:RTW_6.2.0 Jun 12, 2017
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.

7 participants