Menu

Canoo XML from CVS differs from SQLUnit 4.7

2006-03-31
2013-04-25
  • James Henderson

    James Henderson - 2006-03-31

    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 &quot;resultsets-equal&quot; failed (0(INTEGER) != 1(INTEGER) at result[1,1,1])
    *** expected:
    &lt;result>
      &lt;resultset id=&quot;1&quot;>
        &lt;row id=&quot;1&quot;>
          &lt;col id=&quot;1&quot; name=&quot;c1&quot; type=&quot;INTEGER&quot;>0&lt;/col>
        &lt;/row>
      &lt;/resultset>
    &lt;/result>
    *** but got:
    &lt;result>
      &lt;resultset id=&quot;1&quot;>
        &lt;row id=&quot;1&quot;>
          &lt;col id=&quot;1&quot; name=&quot;&quot; type=&quot;INTEGER&quot;>1&lt;/col>
        &lt;/row>
      &lt;/resultset>
    &lt;/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 &quot;resultsets-equal&quot; failed (0(INTEGER) != 1(INTEGER) at result[1,1,1])
    *** expected:
    &lt;result>
      &lt;resultset id=&quot;1&quot;>
        &lt;row id=&quot;1&quot;>
          &lt;col id=&quot;1&quot; name=&quot;c1&quot; type=&quot;INTEGER&quot;>0&lt;/col>
        &lt;/row>
      &lt;/resultset>
    &lt;/result>
    *** but got:
    &lt;result>
      &lt;resultset id=&quot;1&quot;>
        &lt;row id=&quot;1&quot;>
          &lt;col id=&quot;1&quot; name=&quot;&quot; type=&quot;INTEGER&quot;>1&lt;/col>
        &lt;/row>
      &lt;/resultset>
    &lt;/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?

     
    • Sujit Pal

      Sujit Pal - 2006-04-05

      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

       
    • Paul King

      Paul King - 2006-04-15

      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.

       
    • Sujit Pal

      Sujit Pal - 2006-04-30

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.