I am trying to look into the code that causes the transaction problem (http://sourceforge.net/forum/forum.php?thread_id=1299063&forum_id=265576) when I noticed another problem (which I am trying to track down). It appears that the Canoo reported is not reporting the output XML properly under the most recent code:
I have a SQLUnit test (no-transaction related) that does the following:
<test name="MySimpleTest_1: Obtain Result Set">
<sql>
<stmt>
select 1
</stmt>
</sql>
<result>
<resultset id="1">
<row id="1">
<col id="1" type="INTEGER">0</col>
<!-- Should produce an error! -->
</row>
</resultset>
</result>
</test>
Here is the result when I run this test under SQLUnit 4.7:
Yes, please log a bug. I see that there has been no change in the CanooWebTestReporter from SQLUnit 4.7 to now, so its probably something else that needs to be tracked down.
Thanks
Sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have just submitted a patch which I think corrects this bug. I am happy to send you a patched jar file if you can't apply the patch yourself or wait until the patch is applied to the codebase.
Paul.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Sujit,
I am trying to look into the code that causes the transaction problem (http://sourceforge.net/forum/forum.php?thread_id=1299063&forum_id=265576) when I noticed another problem (which I am trying to track down). It appears that the Canoo reported is not reporting the output XML properly under the most recent code:
I have a SQLUnit test (no-transaction related) that does the following:
<test name="MySimpleTest_1: Obtain Result Set">
<sql>
<stmt>
select 1
</stmt>
</sql>
<result>
<resultset id="1">
<row id="1">
<col id="1" type="INTEGER">0</col>
<!-- Should produce an error! -->
</row>
</resultset>
</result>
</test>
Here is the result when I run this test under SQLUnit 4.7:
<?xml version="1.0" encoding="ISO-8859-1"?>
<summary>
<testresult endtime="Thu Mar 30 15:00:40 EST 2006" location="test/MySimpleTest/MySimpleTest.xml" starttime="Thu Mar 30 15:00:39 EST 2006" successful="no" testspecname="sqlunit">
<results>
<step>
<parameter name="stepId" value="MySimpleTest_1: Obtain Result Set"/>
<result>
<failed/>
</result>
</step>
<failure message="net.sourceforge.sqlunit.SQLUnitException: Assertion "resultsets-equal" failed (0(INTEGER) != 1(INTEGER) at result[1,1,1])
*** expected:
<result>
<resultset id="1">
<row id="1">
<col id="1" name="c1" type="INTEGER">0</col>
</row>
</resultset>
</result>
*** but got:
<result>
<resultset id="1">
<row id="1">
<col id="1" name="" type="INTEGER">1</col>
</row>
</resultset>
</result>
"/>
</results>
<config>
<parameter name="debug" value="false"/>
<parameter name="password" value="sqlunit"/>
<parameter name="user" value="sqlunit"/>
<parameter name="reconnect-on-failure" value="off"/>
<parameter name="transaction-support" value="implicit"/>
<parameter name="server-name" value="microsoft_sql_server"/>
<parameter name="haltOnFailure" value="false"/>
<parameter name="url" value="jdbc:microsoft:sqlserver://JAMESXP\SQL2K:1433;databaseName=James_254"/>
<parameter name="driver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
</config>
</testresult>
</summary>
Here are the test results when I run it under the most recent source code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<summary>
<testresult endtime="Thu Mar 30 16:26:00 EST 2006" location="test/MyTranCount/MySimpleTest.xml" starttime="Thu Mar 30 16:25:59 EST 2006" successful="no" testspecname="sqlunit">
<results>
<failure message="net.sourceforge.sqlunit.SQLUnitException: Assertion "resultsets-equal" failed (0(INTEGER) != 1(INTEGER) at result[1,1,1])
*** expected:
<result>
<resultset id="1">
<row id="1">
<col id="1" name="c1" type="INTEGER">0</col>
</row>
</resultset>
</result>
*** but got:
<result>
<resultset id="1">
<row id="1">
<col id="1" name="" type="INTEGER">1</col>
</row>
</resultset>
</result>
"/>
</results>
<config>
<parameter name="debug" value="true"/>
<parameter name="password" value="sqlunit"/>
<parameter name="user" value="sqlunit"/>
<parameter name="reconnect-on-failure" value="off"/>
<parameter name="transaction-support" value="implicit"/>
<parameter name="server-name" value="microsoft_sql_server"/>
<parameter name="haltOnFailure" value="true"/>
<parameter name="url" value="jdbc:microsoft:sqlserver://JAMESXP\SQL2K:1433;databaseName=James_254"/>
<parameter name="driver" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
</config>
</testresult>
</summary>
As you can see the following XML fragment is missing from the most recent build:
<step>
<parameter name="stepId" value="MySimpleTest_1: Obtain Result Set"/>
<result>
<failed/>
</result>
</step>
I will continue to try and look into it, but in the meantime should I log a bug so that it is a known issue?
Hi James,
Yes, please log a bug. I see that there has been no change in the CanooWebTestReporter from SQLUnit 4.7 to now, so its probably something else that needs to be tracked down.
Thanks
Sujit
I have just submitted a patch which I think corrects this bug. I am happy to send you a patched jar file if you can't apply the patch yourself or wait until the patch is applied to the codebase.
Paul.
James, the CVS is also patched with Paul's changes in case you haven't already updated your local copy with Paul's changes.
-sujit