Skip to content

Commit

Permalink
Added information to error message
Browse files Browse the repository at this point in the history
To debug a random mismatch error which can't be reproduced locally.
  • Loading branch information
rene-ye committed Feb 8, 2018
1 parent 6c79be8 commit 25301e6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
Expand Up @@ -3428,19 +3428,24 @@ final boolean doExecute() throws SQLServerException {
}
}
finally {
if (integratedSecurity) {
if (null != authentication)
authentication.ReleaseClientContext();
authentication = null;

if (integratedSecurity) {
if (null != ImpersonatedUserCred) {
try {
ImpersonatedUserCred.dispose();
if (ImpersonatedUserCred.getRemainingLifetime() <= 0) {
if (null != authentication)
authentication.ReleaseClientContext();
authentication = null;
ImpersonatedUserCred.dispose();
}
}
catch (GSSException e) {
if (connectionlogger.isLoggable(Level.FINER))
connectionlogger.finer(toString() + " Release of the credentials failed GSSException: " + e);
}
} else {
if (null != authentication)
authentication.ReleaseClientContext();
authentication = null;
}
}
}
Expand Down
Expand Up @@ -92,16 +92,16 @@ public static void compareExpectedAndActual(int dataType,
else
switch (dataType) {
case java.sql.Types.BIGINT:
assertTrue((((Long) expectedValue).longValue() == ((Long) actualValue).longValue()), "Unexpected bigint value");
assertTrue((((Long) expectedValue).longValue() == ((Long) actualValue).longValue()), "Unexpected bigint value. Expected:" + ((Long) expectedValue).longValue() + " Actual:" + ((Long) actualValue).longValue());
break;

case java.sql.Types.INTEGER:
assertTrue((((Integer) expectedValue).intValue() == ((Integer) actualValue).intValue()), "Unexpected int value");
assertTrue((((Integer) expectedValue).intValue() == ((Integer) actualValue).intValue()), "Unexpected int value. Expected:" + ((Integer) expectedValue).intValue() + " Actual:" + ((Integer) actualValue).intValue());
break;

case java.sql.Types.SMALLINT:
case java.sql.Types.TINYINT:
assertTrue((((Short) expectedValue).shortValue() == ((Short) actualValue).shortValue()), "Unexpected smallint/tinyint value");
assertTrue((((Short) expectedValue).shortValue() == ((Short) actualValue).shortValue()), "Unexpected smallint/tinyint value. Expected:" + ((Short) expectedValue).shortValue() + " Actual:" + ((Short) actualValue).shortValue());
break;

case java.sql.Types.BIT:
Expand All @@ -115,11 +115,11 @@ public static void compareExpectedAndActual(int dataType,
break;

case java.sql.Types.DOUBLE:
assertTrue((((Double) expectedValue).doubleValue() == ((Double) actualValue).doubleValue()), "Unexpected float value");
assertTrue((((Double) expectedValue).doubleValue() == ((Double) actualValue).doubleValue()), "Unexpected double value. Expected:" + ((Double) expectedValue).doubleValue() + " Actual:" + ((Double) actualValue).doubleValue());
break;

case java.sql.Types.REAL:
assertTrue((((Float) expectedValue).floatValue() == ((Float) actualValue).floatValue()), "Unexpected real value");
assertTrue((((Float) expectedValue).floatValue() == ((Float) actualValue).floatValue()), "Unexpected real/float value. Expected:" + ((Float) expectedValue).floatValue() + " Actual:" + ((Float) actualValue).floatValue());
break;

case java.sql.Types.VARCHAR:
Expand Down

0 comments on commit 25301e6

Please sign in to comment.