net.sourceforge.jtds.test
Class BatchTest
java.lang.Object
|
+--junit.framework.Assert
|
+--junit.framework.TestCase
|
+--net.sourceforge.jtds.test.TestBase
|
+--net.sourceforge.jtds.test.DatabaseTestCase
|
+--net.sourceforge.jtds.test.BatchTest
- All Implemented Interfaces:
- junit.framework.Test
- public class BatchTest
- extends DatabaseTestCase
Simple test suite to exercise batch execution.
- Version:
- $Id: BatchTest.java,v 1.11 2007/07/12 21:21:27 bheineman Exp $
Inner Class Summary |
private class |
BatchTest.ConcurrentBatchingHelper
Helper thread used by testConcurrentBatching() to execute a batch within a transaction that is
then rolled back. |
Fields inherited from class junit.framework.TestCase |
fName |
Constructor Summary |
BatchTest(java.lang.String name)
|
Method Summary |
static void |
main(java.lang.String[] args)
|
void |
testBatch()
Test batched statements. |
void |
testBatchDupKey()
Test for bug [1371295] SQL Server continues after duplicate key error. |
void |
testBatchEsc()
Test for bug [1180169] JDBC escapes not allowed with Sybase addBatch. |
void |
testCallStmtBatch()
Test batched callable statements. |
void |
testCallStmtBatch2()
Test batched callable statements where the call includes literal parameters which prevent the use of RPC calls. |
void |
testCallStmtNoParams()
Test batched callable statements where the call has no parameters. |
void |
testConcurrentBatching()
Test batched prepared statement concurrency. |
void |
testLargeBatch()
Test large batch behavior. |
void |
testNoCount()
The first statement in this batch does not return an update count. |
void |
testPrepStmtBatch()
Test batched prepared statements. |
void |
testPrepStmtBatchDupKey()
Test for bug [1371295] SQL Server continues after duplicate key error. |
void |
testPrepStmtNoParams()
Test for PreparedStatement batch with no parameters. |
void |
testPrepStmtVariableParams()
Test for PreparedStatement batch with variable parameter types. |
void |
testResultSetError()
This test should generate an error as the second statement in the batch
returns a result set. |
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 |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
SUCCESS_NO_INFO
private static int SUCCESS_NO_INFO
EXECUTE_FAILED
private static int EXECUTE_FAILED
BatchTest
public BatchTest(java.lang.String name)
testResultSetError
public void testResultSetError()
throws java.lang.Exception
- This test should generate an error as the second statement in the batch
returns a result set.
testNoCount
public void testNoCount()
throws java.lang.Exception
- The first statement in this batch does not return an update count.
SUCCESS_NO_INFO is expected instead.
testBatch
public void testBatch()
throws java.lang.Exception
- Test batched statements.
testPrepStmtBatch
public void testPrepStmtBatch()
throws java.lang.Exception
- Test batched prepared statements.
testCallStmtBatch
public void testCallStmtBatch()
throws java.lang.Exception
- Test batched callable statements.
testCallStmtBatch2
public void testCallStmtBatch2()
throws java.lang.Exception
- Test batched callable statements where the call includes literal parameters which prevent the use of RPC calls.
testLargeBatch
public void testLargeBatch()
throws java.lang.Exception
- Test large batch behavior.
testBatchEsc
public void testBatchEsc()
throws java.lang.Exception
- Test for bug [1180169] JDBC escapes not allowed with Sybase addBatch.
testPrepStmtBatchDupKey
public void testPrepStmtBatchDupKey()
throws java.lang.Exception
- Test for bug [1371295] SQL Server continues after duplicate key error.
testBatchDupKey
public void testBatchDupKey()
throws java.lang.Exception
- Test for bug [1371295] SQL Server continues after duplicate key error.
testPrepStmtNoParams
public void testPrepStmtNoParams()
throws java.lang.Exception
- Test for PreparedStatement batch with no parameters.
testPrepStmtVariableParams
public void testPrepStmtVariableParams()
throws java.lang.Exception
- Test for PreparedStatement batch with variable parameter types.
testCallStmtNoParams
public void testCallStmtNoParams()
throws java.lang.Exception
- Test batched callable statements where the call has no parameters.
testConcurrentBatching
public void testConcurrentBatching()
throws java.lang.Exception
- Test batched prepared statement concurrency. Batch prepares must not disappear between the moment when they
were created and when they are executed.
main
public static void main(java.lang.String[] args)
Generated on August 22 2007