net.sourceforge.jtds.jdbc
Class StatementTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended bynet.sourceforge.jtds.jdbc.TestBase
              extended bynet.sourceforge.jtds.jdbc.StatementTest
All Implemented Interfaces:
junit.framework.Test

public class StatementTest
extends TestBase

Author:
Holger Rehn

Field Summary
 
Fields inherited from class net.sourceforge.jtds.jdbc.TestBase
con, props
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
StatementTest(java.lang.String name)
           
 
Method Summary
 void testBug473()
          Test for bug #473, Statement.setMaxRows() also effects INSERT, UPDATE, DELETE and SELECT INTO.
 void testBug500()
          Test for bug #500, Statement.execute() raises executeQuery() exception if using cursors (useCursors=true) and SHOWPLAN_ALL is set to ON.
 void testBug528()
          Regression test for bug #528, ResultSet not getting populated correctly with autogenerated keys.
 void testBug544()
          Test for bug #544, getMoreResults() does not work with insert triggers.
 void testBug559()
          Test for bug #559, unique constraint violation error hidden by an internal jTDS error.
 void testBug609()
          Test for bug #609, slow finalization in SharedSocket#closeStream() can block JVM finalizer thread or cause OOM errors.
 void testBug635()
          Test for bug #635, select from a view with order by clause doesn't work if correctly if using Statement.setMaxRows().
 void testCloseComputedResult()
           Test to ensure that single results generated as result of aggregation operations (COMPUTE clause) can be closed individually without affecting remaining ResultSets.
 void testCloseDeadlock()
          Regression test for bug #677, deadlock in JtdsStatement.close().
 void testComputeClause()
          Test for computed results, bug #678.
 void testConcurrentClose()
           
 void testDuplicateKey()
          Test for bug #669, no error if violating unique constraint in update.
 void testFullTextSearch()
          Test for bug #624, full text search causes connection reset when connected to Microsoft SQL Server 2008.
 void testMultiLineComment()
          Test for #676, error in multi line comment handling.
 void testQueryTimeout()
           Test for bug [1694194], queryTimeout does not work on MSSQL2005 when property 'useCursors' is set to 'true'.
 
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

StatementTest

public StatementTest(java.lang.String name)
Method Detail

testBug544

public void testBug544()
                throws java.lang.Exception
Test for bug #544, getMoreResults() does not work with insert triggers.

Throws:
java.lang.Exception

testBug500

public void testBug500()
                throws java.lang.Exception
Test for bug #500, Statement.execute() raises executeQuery() exception if using cursors (useCursors=true) and SHOWPLAN_ALL is set to ON.

Throws:
java.lang.Exception

testBug528

public void testBug528()
                throws java.lang.Exception
Regression test for bug #528, ResultSet not getting populated correctly with autogenerated keys.

Throws:
java.lang.Exception

testBug559

public void testBug559()
                throws java.lang.Exception
Test for bug #559, unique constraint violation error hidden by an internal jTDS error.

Throws:
java.lang.Exception

testBug609

public void testBug609()
                throws java.lang.Exception
Test for bug #609, slow finalization in SharedSocket#closeStream() can block JVM finalizer thread or cause OOM errors.

Throws:
java.lang.Exception

testBug473

public void testBug473()
                throws java.lang.Exception
Test for bug #473, Statement.setMaxRows() also effects INSERT, UPDATE, DELETE and SELECT INTO.

Throws:
java.lang.Exception

testBug635

public void testBug635()
                throws java.lang.Exception
Test for bug #635, select from a view with order by clause doesn't work if correctly if using Statement.setMaxRows().

Throws:
java.lang.Exception

testFullTextSearch

public void testFullTextSearch()
                        throws java.lang.Exception
Test for bug #624, full text search causes connection reset when connected to Microsoft SQL Server 2008.

Throws:
java.lang.Exception

testComputeClause

public void testComputeClause()
                       throws java.lang.Exception
Test for computed results, bug #678.

Throws:
java.lang.Exception

testCloseComputedResult

public void testCloseComputedResult()
                             throws java.lang.Exception

Test to ensure that single results generated as result of aggregation operations (COMPUTE clause) can be closed individually without affecting remaining ResultSets.

Throws:
java.lang.Exception

testConcurrentClose

public void testConcurrentClose()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testCloseDeadlock

public void testCloseDeadlock()
                       throws java.lang.Exception
Regression test for bug #677, deadlock in JtdsStatement.close().

Throws:
java.lang.Exception

testMultiLineComment

public void testMultiLineComment()
                          throws java.lang.Exception
Test for #676, error in multi line comment handling.

Throws:
java.lang.Exception

testDuplicateKey

public void testDuplicateKey()
                      throws java.lang.Exception
Test for bug #669, no error if violating unique constraint in update.

Throws:
java.lang.Exception

testQueryTimeout

public void testQueryTimeout()
                      throws java.lang.Exception

Test for bug [1694194], queryTimeout does not work on MSSQL2005 when property 'useCursors' is set to 'true'. Furthermore, the test also checks timeout with a query that cannot use a cursor.

This test requires property 'queryTimeout' to be set to true.

Throws:
java.lang.Exception


Generated on October 27 2012