|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase net.sourceforge.jtds.jdbc.TestBase net.sourceforge.jtds.jdbc.DatabaseTestCase net.sourceforge.jtds.jdbc.SAfeTest
Field Summary |
Fields inherited from class net.sourceforge.jtds.jdbc.DatabaseTestCase |
|
Fields inherited from class net.sourceforge.jtds.jdbc.TestBase |
con, props |
Fields inherited from class junit.framework.TestCase |
|
Constructor Summary | |
SAfeTest(java.lang.String name)
|
Method Summary | |
private static void |
insertBigDecimal(java.sql.PreparedStatement stmt,
double val,
boolean scaleFlag)
Helper method for testBigDecimal0007 . |
static void |
main(java.lang.String[] args)
|
void |
testBatchUpdates0015()
Test batch updates for both plain and prepared statements. |
void |
testBigDecimal0007()
Test BigDecimal s created from double values (i.e with very
large scales). |
void |
testBigDecimal1()
Test for bug [939206] TdsException: can't sent this BigDecimal |
void |
testBitFields0005()
Check that values returned from bit fields are correct (not just 0) (bug #841670). |
void |
testBytesToString()
Test that getString() on a varbinary column returns a hex string. |
void |
testCallableStatement0006()
Test that CallableStatement s with return values work correctly. |
void |
testCallableStatementVarchar0010()
Test VARCHAR output parameters returned by CallableStatements. |
void |
testCancel0001()
Test cancelling. |
void |
testCancel0002()
Test cancelling. |
void |
testCancel0003()
Test for bug #343, Statement hangs in socket read after Statement.cancel() . |
void |
testCursorResultSetConcurrency0003()
Test concurrency. |
void |
testCursorResultSetEmpty0004()
Check that meta data information is fetched even for empty cursor-based result sets (bug #613199). |
void |
testDataTruncException()
Test DataTruncation exception. |
void |
testDatetimeRounding1()
Test for bug [983561] getDatetimeValue truncates fractional milliseconds |
void |
testDeleteRow0009()
Test ResultSet.deleteRow() on updateable result sets. |
void |
testExecuteUpdateSelect()
Tests that executeUpdate("SELECT ...") |
void |
testFloat1()
Test for bug [963799] float values change when written to the database |
void |
testFnEscape()
Test for bug related with [1368058] Calling StoredProcedure with functions ({fn} escape can't handle special characters, e.g. underscore). |
void |
testFnEscapeNesting()
Test for bug #1116046 {fn } escape can't handle nested functions. |
void |
testGetMultiScrollRs()
Test return of multiple scrollable result sets from one execute. |
void |
testInsertRow0012()
Test ResultSet.insertRow() on updateable result sets. |
void |
testLongToVarchar0008()
Test writing long values to VARCHAR fields. |
void |
testMaxFieldSize()
Test Statement.setMaxFieldSize() . |
void |
testNestedFunctions()
Regression test for bug #615, the SQL parser doesn't correctly handle {fn } escapes containing nested (unescaped) functions. |
void |
testNullLengthStrings0001()
Test whether NULL values, 0-length strings and single space strings are treated right. |
void |
testNullOutputParameters()
Test that null output parameters are handled correctly.
|
void |
testOldDates0016()
Test that dates prior to 06/15/1940 0:00:00 are stored and retrieved correctly. |
void |
testOutOfOrderClose0013()
Test how an "out-of-order" close behaves (e.g close the Connection first, then the Statement anf
finally the ResultSet ). |
void |
testPlainResultSetPosition0004()
Check that the isBeforeFirst , isAfterLast ,
isFirst and isLast methods work for
forward-only, read-only result sets (bug [1039876] MS SQL
JtdsResultSet.isAfterLast() always returns false). |
void |
testPreparedAndCallableCursors0014()
Test cursor-based ResultSet s obtained from
PreparedStatement s and CallableStatement s. |
void |
testQueryTimeout()
Test for bug [1222199] Delayed exception thrown in statement close. |
void |
testSocketConcurrency1()
|
void |
testSocketConcurrency2()
|
void |
testSocketConcurrency3()
|
void |
testSocketConcurrency4()
Test running SELECT queries on one Statement at the same
time as cancel() is called on a concurrent
Statement . |
void |
testTableParsing()
Test that the SQL parser doesn't try to parse the table name unless necessary (or that it is able to parse function calls if it does). |
void |
testThreadInterrupt()
Test for bug #507, executeQuery absorbs thread interrupt status |
void |
testUnterminatedCommentParsing()
Test for bug [1187927] Driver Hangs on Statement.execute(). |
void |
testUpdateRow0011()
Test ResultSet.updateRow() on updateable result sets. |
Methods inherited from class net.sourceforge.jtds.jdbc.DatabaseTestCase |
compareBytes, getLongString, getLongString, getType, getTypemap |
Methods inherited from class net.sourceforge.jtds.jdbc.TestBase |
compareInputStreams, compareReaders, connect, dropDatabase, dropFunction, dropProcedure, dropTable, dropTrigger, dropType, dropView, dump, dump, dumpAll, dumpKeys, dumpRow, dumpRow, getConnection, getConnection, makeObjects, makeTestTables, setUp, tearDown |
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SAfeTest(java.lang.String name)
Method Detail |
public static void main(java.lang.String[] args)
public void testNullLengthStrings0001() throws java.lang.Exception
java.lang.Exception
public void testCancel0001() throws java.lang.Exception
java.lang.Exception
public void testCancel0002() throws java.lang.Exception
java.lang.Exception
public void testCancel0003() throws java.lang.Exception
Test for bug #343, Statement hangs in socket read after Statement.cancel()
.
In 1.0.1 and earlier versions network packets consisting of a single TDS_DONE packet with the CANCEL flag set were ignored and a new read() was attempted, essentially causing a deadlock.
Because it relies on a particular succession of events this test will not always work as expected, i.e. the cancel might be executed too early or too late, but it won't fail in this situation.
java.lang.Exception
public void testQueryTimeout() throws java.lang.Exception
java.lang.Exception
public void testCursorResultSetConcurrency0003() throws java.lang.Exception
Test concurrency. Create a number of threads that execute concurrent queries using scrollable result sets. All requests should be run on the same connection.
java.lang.Exception
public void testCursorResultSetEmpty0004() throws java.lang.Exception
java.lang.Exception
public void testPlainResultSetPosition0004() throws java.lang.Exception
isBeforeFirst
, isAfterLast
,
isFirst
and isLast
methods work for
forward-only, read-only result sets (bug [1039876] MS SQL
JtdsResultSet.isAfterLast() always returns false).
java.lang.Exception
- if an error condition occurspublic void testBitFields0005() throws java.lang.Exception
java.lang.Exception
public void testCallableStatement0006() throws java.lang.Exception
CallableStatement
s with return values work correctly.
java.lang.Exception
private static void insertBigDecimal(java.sql.PreparedStatement stmt, double val, boolean scaleFlag) throws java.lang.Exception
testBigDecimal0007
. Inserts a BigDecimal
value obtained from a double value.
stmt
- PreparedStatement
instanceval
- the double
value to insertscaleFlag
- if true
scale the value to 4, otherwise
leave it as it is
java.lang.Exception
public void testBigDecimal0007() throws java.lang.Exception
BigDecimal
s created from double values (i.e with very
large scales).
java.lang.Exception
public void testLongToVarchar0008() throws java.lang.Exception
long
values to VARCHAR fields. There was a
regression introduced in release 0.6 that caused long
fields to be sent with non-zero scale and appear with decimals when
written into VARCHAR fields.
java.lang.Exception
public void testDeleteRow0009() throws java.lang.Exception
ResultSet.deleteRow()
on updateable result sets.
java.lang.Exception
public void testCallableStatementVarchar0010() throws java.lang.Exception
An issue existed, caused by the fact that the parameter was sent to SQL Server as a short VARCHAR (not XORed with 0x80) limiting its length to 255 characters. See bug [815348] for more details.
java.lang.Exception
public void testUpdateRow0011() throws java.lang.Exception
ResultSet.updateRow()
on updateable result sets.
java.lang.Exception
public void testInsertRow0012() throws java.lang.Exception
ResultSet.insertRow()
on updateable result sets.
java.lang.Exception
public void testOutOfOrderClose0013() throws java.lang.Exception
Connection
first, then the Statement
anf
finally the ResultSet
).
java.lang.Exception
public void testPreparedAndCallableCursors0014() throws java.lang.Exception
ResultSet
s obtained from
PreparedStatement
s and CallableStatement
s.
java.lang.Exception
public void testBatchUpdates0015() throws java.lang.Exception
java.lang.Exception
public void testOldDates0016() throws java.lang.Exception
java.lang.Exception
public void testBigDecimal1() throws java.lang.Exception
java.lang.Exception
public void testFloat1() throws java.lang.Exception
java.lang.Exception
public void testDatetimeRounding1() throws java.lang.Exception
java.lang.Exception
public void testSocketConcurrency1()
public void testSocketConcurrency2()
public void testSocketConcurrency3()
public void testSocketConcurrency4() throws java.lang.Exception
Statement
at the same
time as cancel()
is called on a concurrent
Statement
.
java.lang.Exception
public void testNullOutputParameters() throws java.sql.SQLException
null
output parameters are handled correctly.
It seems that if a non-nullable type is sent as input value and the
output value is NULL, SQL Server (not Sybase) gets confused and returns
the same type but a single 0 byte as value instead of the equivalent
nullable type (e.g. instead of returning an INTN
with
length 0, which means it's null, it returns an INT4
followed by a single 0 byte). The output parameter packet length is also
incorrect, which indicates that SQL Server is confused.
Currently jTDS always sends RPC parameters as nullable types, but this
test is necessary to ensure that it will always remain so.
java.sql.SQLException
public void testTableParsing() throws java.sql.SQLException
java.sql.SQLException
public void testFnEscape() throws java.lang.Exception
java.lang.Exception
public void testNestedFunctions() throws java.lang.Exception
Regression test for bug #615, the SQL parser doesn't correctly handle {fn } escapes containing nested (unescaped) functions.
java.lang.Exception
public void testFnEscapeNesting() throws java.lang.Exception
java.lang.Exception
public void testDataTruncException() throws java.lang.Exception
DataTruncation
exception.
java.lang.Exception
public void testMaxFieldSize() throws java.lang.Exception
Statement.setMaxFieldSize()
.
java.lang.Exception
public void testGetMultiScrollRs() throws java.lang.Exception
java.lang.Exception
public void testUnterminatedCommentParsing() throws java.lang.Exception
java.lang.Exception
public void testBytesToString() throws java.lang.Exception
java.lang.Exception
public void testExecuteUpdateSelect() throws java.lang.Exception
executeUpdate("SELECT ...")
fails.
java.lang.Exception
public void testThreadInterrupt() throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |