|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--net.sourceforge.jtds.test.TestBase | +--net.sourceforge.jtds.test.DatabaseTestCase | +--net.sourceforge.jtds.test.SAfeTest
Field Summary | |
(package private) int |
done
|
(package private) boolean |
failed
|
(package private) int |
started
|
Fields inherited from class net.sourceforge.jtds.test.DatabaseTestCase |
typemap |
Fields inherited from class net.sourceforge.jtds.test.TestBase |
con, CONNECTION_PROPERTIES, props |
Fields inherited from class junit.framework.TestCase |
fName |
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 [1120442] Statement hangs in socket read after Statement.cancel(). |
void |
testCursorResultSetConcurrency0003()
Test CursorResultSet 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 ...") fails. |
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. |
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 |
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 [1596743] 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.test.DatabaseTestCase |
compareBytes, dropFunction, dropProcedure, dropProcedure, dropTable, getLongString, getLongString, getType, getTypemap |
Methods inherited from class net.sourceforge.jtds.test.TestBase |
compareInputStreams, compareReaders, connect, disconnect, dump, dumpRow, getConnection, getConnection, loadProperties, 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, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
|
Field Detail |
volatile int started
volatile int done
volatile boolean failed
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
public void testCancel0001() throws java.lang.Exception
public void testCancel0002() throws java.lang.Exception
public void testCancel0003() throws java.lang.Exception
public void testQueryTimeout() throws java.lang.Exception
public void testCursorResultSetConcurrency0003() throws java.lang.Exception
CursorResultSet
concurrency. Create a number of threads that execute concurrent queries using
scrollable result sets. All requests should be run on the same connection (Tds
instance).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 ispublic void testBigDecimal0007() throws java.lang.Exception
BigDecimal
s created from double values (i.e with very
large scales).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.public void testDeleteRow0009() throws java.lang.Exception
ResultSet.deleteRow()
on updateable result sets.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.
public void testUpdateRow0011() throws java.lang.Exception
ResultSet.updateRow()
on updateable result sets.public void testInsertRow0012() throws java.lang.Exception
ResultSet.insertRow()
on updateable result sets.public void testOutOfOrderClose0013() throws java.lang.Exception
Connection
first, then the Statement
anf
finally the ResultSet
).public void testPreparedAndCallableCursors0014() throws java.lang.Exception
ResultSet
s obtained from
PreparedStatement
s and CallableStatement
s.public void testBatchUpdates0015() throws java.lang.Exception
public void testOldDates0016() throws java.lang.Exception
public void testBigDecimal1() throws java.lang.Exception
public void testFloat1() throws java.lang.Exception
public void testDatetimeRounding1() throws 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
.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.public void testTableParsing() throws java.sql.SQLException
public void testFnEscape() throws java.lang.Exception
public void testFnEscapeNesting() throws java.lang.Exception
public void testDataTruncException() throws java.lang.Exception
DataTruncation
exception.public void testMaxFieldSize() throws java.lang.Exception
Statement.setMaxFieldSize()
.public void testGetMultiScrollRs() throws java.lang.Exception
public void testUnterminatedCommentParsing() throws java.lang.Exception
public void testBytesToString() throws java.lang.Exception
public void testExecuteUpdateSelect() throws java.lang.Exception
executeUpdate("SELECT ...")
fails.public void testThreadInterrupt() throws java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |