Skip to content

Add formatErrorMsg for comparing error messages in tests#1034

Merged
lilgreenbird merged 10 commits intomicrosoft:devfrom
lilgreenbird:testutil
Apr 24, 2019
Merged

Add formatErrorMsg for comparing error messages in tests#1034
lilgreenbird merged 10 commits intomicrosoft:devfrom
lilgreenbird:testutil

Conversation

@lilgreenbird
Copy link
Copy Markdown
Contributor

@lilgreenbird lilgreenbird commented Apr 12, 2019

formatErrorMsg() from @rene-ye

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #1034 into dev will increase coverage by <.01%.
The diff coverage is 58.09%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #1034      +/-   ##
============================================
+ Coverage     50.81%   50.81%   +<.01%     
+ Complexity     2966     2963       -3     
============================================
  Files           120      120              
  Lines         28001    27940      -61     
  Branches       4686     4675      -11     
============================================
- Hits          14228    14199      -29     
+ Misses        11618    11591      -27     
+ Partials       2155     2150       -5
Flag Coverage Δ Complexity Δ
#JDBC42 50.33% <58.09%> (-0.08%) 2924 <20> (-2)
#JDBC43 50.76% <58.09%> (+0.01%) 2961 <20> (-2) ⬇️
Impacted Files Coverage Δ Complexity Δ
.../microsoft/sqlserver/jdbc/SQLServerConnection.java 47.43% <58.09%> (+0.16%) 367 <20> (ø) ⬇️
...ncurrentlinkedhashmap/ConcurrentLinkedHashMap.java 38.57% <0%> (-0.44%) 43% <0%> (ø)
...m/microsoft/sqlserver/jdbc/SQLServerResultSet.java 43.83% <0%> (-0.23%) 322% <0%> (-2%)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 57.86% <0%> (+0.03%) 0% <0%> (ø) ⬇️
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 63.36% <0%> (+0.21%) 95% <0%> (ø) ⬇️
...om/microsoft/sqlserver/jdbc/ReaderInputStream.java 45.05% <0%> (+1.09%) 15% <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 8acab59...1f826a0. Read the comment docs.

@codecov-io
Copy link
Copy Markdown

codecov-io commented Apr 12, 2019

Codecov Report

Merging #1034 into dev will increase coverage by 0.01%.
The diff coverage is 57.42%.

Impacted file tree graph

@@             Coverage Diff              @@
##                dev    #1034      +/-   ##
============================================
+ Coverage     50.83%   50.84%   +0.01%     
- Complexity     2964     2967       +3     
============================================
  Files           120      120              
  Lines         28001    27952      -49     
  Branches       4686     4675      -11     
============================================
- Hits          14233    14213      -20     
+ Misses        11616    11584      -32     
- Partials       2152     2155       +3
Flag Coverage Δ Complexity Δ
#JDBC42 50.41% <57.42%> (-0.03%) 2930 <5> (+2)
#JDBC43 50.81% <57.42%> (+0.12%) 2966 <5> (+9) ⬆️
Impacted Files Coverage Δ Complexity Δ
...ava/com/microsoft/sqlserver/jdbc/FailOverInfo.java 52.63% <100%> (ø) 0 <0> (ø) ⬇️
.../microsoft/sqlserver/jdbc/SQLServerConnection.java 47.37% <57%> (+0.1%) 367 <5> (ø) ⬇️
...c/main/java/com/microsoft/sqlserver/jdbc/Util.java 63.36% <0%> (-0.44%) 95% <0%> (-1%)
...rc/main/java/com/microsoft/sqlserver/jdbc/DDC.java 47.3% <0%> (-0.22%) 112% <0%> (+1%)
...rc/main/java/com/microsoft/sqlserver/jdbc/dtv.java 68.59% <0%> (-0.12%) 0% <0%> (ø)
...in/java/com/microsoft/sqlserver/jdbc/IOBuffer.java 57.89% <0%> (-0.1%) 0% <0%> (ø)
...om/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java 50.52% <0%> (+0.12%) 246% <0%> (+1%) ⬆️
...ncurrentlinkedhashmap/ConcurrentLinkedHashMap.java 39.22% <0%> (+0.86%) 44% <0%> (+2%) ⬆️
...om/microsoft/sqlserver/jdbc/ReaderInputStream.java 47.25% <0%> (+2.19%) 15% <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 e1f3d7e...d19e7ea. Read the comment docs.

Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
cheenamalhotra
cheenamalhotra previously approved these changes Apr 16, 2019
@cheenamalhotra cheenamalhotra added this to the 7.3.1 milestone Apr 16, 2019
ulvii
ulvii previously approved these changes Apr 16, 2019
rene-ye
rene-ye previously approved these changes Apr 16, 2019
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
@lilgreenbird lilgreenbird dismissed stale reviews from rene-ye, ulvii, and cheenamalhotra via 6a970e0 April 17, 2019 20:02
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/test/java/com/microsoft/sqlserver/jdbc/TestUtils.java Outdated
Comment thread src/test/java/com/microsoft/sqlserver/jdbc/TestUtils.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java Outdated
} else {
timeoutUnitInterval = timerTimeout;
}
timeoutUnitInterval = (isDBMirroring || useParallel) ? (long) (TIMEOUTSTEP * timerTimeout)
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.

Why do we need to do this? This impacts readability a lot.

static int timerRemaining(long timerExpire) {
long remaining = timerExpire - System.currentTimeMillis();
// maximum timeout the socket takes is int max, minimum is at least 1 ms
return (int) ((remaining > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (remaining <= 0) ? 1 : remaining);
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.

same here as above

fedAuthRequiredByUser = true;
}

fedAuthRequiredByUser = (!authenticationString.equalsIgnoreCase(SqlAuthentication.NotSpecified.toString()))
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.

Why was this line added? it looks like a duplicate of line 2436?

Comment thread src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
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.

6 participants