Thanks for catching it, and my apologies, it used to be a debug line, I must have made it a warning for ease of debugging and not reset it. I have turned it back to a debug which will not show up in the normal (non-debug) test run. Its in CVS now. I plan to release a new version this weekend, which will contain this fix as well as some other fixes.
In the meantime, you are welcome to download this change from here:
Checking in src/net/sourceforge/sqlunit/handlers/SqlHandler.java;
/cvsroot/sqlunit/sqlunit/src/net/sourceforge/sqlunit/handlers/SqlHandler.java,v <-- SqlHandler.java
new revision: 1.20; previous revision: 1.19
done
or, since you have a workaround for this, download the release sometime next week.
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I'm trying to do the following:
<test name="Inserting Incomplete Employee (NULL Email Address)">
<call>
<stmt>exec InsertEmployee ?, ?, ?, ?</stmt>
<param id="1" type="VARCHAR" is-null="true"></param>
<param id="2" type="VARCHAR"></param>
<param id="3" type="VARCHAR"></param>
<param id="4" type="INTEGER" inout="out">${Employee_Id}</param>
</call>
<result>
<exception>
<code>50000</code>
<message>[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]InsertEmployee: EmailAddress may not be NULL</message>
</exception>
</result>
</test>
This works fine. However, the output looks like this:
[sqlunit] WARN [main] (SqlHandler.java:155) - Cannot set output parameters, 50000:[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]InsertEmployee: EmailAddress may not be NULL
[sqlunit] Running test[1]: Inserting Incomplete Employee (NULL Email Address) (80ms)
As you can see, it's rather cluttered, once I'm running a few tests it all gets rather difficult to read.
Is there any way of preventing this warning? I understand why it's telling me but I don't care as I'm expecting the error message.
If I make any changes to the out param then the test won't run at all.
Thanks in advance.
Regards,
Oliver Hopton.
Turns out that running ANT with the -q switch solves my problem.
Hi Oliver,
Thanks for catching it, and my apologies, it used to be a debug line, I must have made it a warning for ease of debugging and not reset it. I have turned it back to a debug which will not show up in the normal (non-debug) test run. Its in CVS now. I plan to release a new version this weekend, which will contain this fix as well as some other fixes.
In the meantime, you are welcome to download this change from here:
Checking in src/net/sourceforge/sqlunit/handlers/SqlHandler.java;
/cvsroot/sqlunit/sqlunit/src/net/sourceforge/sqlunit/handlers/SqlHandler.java,v <-- SqlHandler.java
new revision: 1.20; previous revision: 1.19
done
or, since you have a workaround for this, download the release sometime next week.
-sujit
Sujit,
Thanks!
I'm new to SqlUnit, finding it a very cool addition to my unit testing, many thanks for your effort.
Oliver.
Hi Oliver,
Thank you for the appreciation, and I hope you find it an useful tool in your arsenal.
I am going to push the release back a bit so I can probably fold another fix in. Hope thats ok.
-sujit