Hello. Used both JUnit 4.12 and 4.13-beta-1. Also dbUnit 3.4.2 and 3.4.6 and also xmlunit both 1.3 and 1.6.
Firstly apologies if this is in the wrong place. I am also unsure if this issue is JUnit or dbUnit.
We are creating JUnits and using xml datasets as an expected result following running tests, to ensure data is as expected on our Oracle database.
We are now finding an issue, where if we look for null values in our dataset ([null]), it does not fail if the column we are checking does actually contain a value.
If we specify a value in the data set, which is different to the actual value in the colum, it will fail and tell us the difference.
So the issue is that the data set does not detect if a column has a value it in, when our data set is looking for a NULL value.
In the code snippet below, if there is a value on the table 'TABLE_NAME' in the column 'COLUMN_THREE', it will not throw an error.
<?xml version='1.0' encoding='UTF-8'?>
<dataset xmlns:exap="schema_instance" >
<exap:TABLE_NAME COLUMN_ONE="1" COLUMN_TWO="STACKSAMUS" COLUMN_THREE="[null]" />
</dataset>
Thank you very much for any information or help that can be provided and to all those who have put the work into this framework.
Stacks
Those dbUnit versions do not exist. Please verify...
It's not JUnit as it does not use datasets or verify database tables.
You created this as a bug and it is unknown so far (is probably local config problem). It's better to use the email list for discussion and then create a bug if looks like it.
You posted the dataset but:
Last edit: Jeff Jensen 2018-12-13
Hello and thank you for the reply. I have spent a while trying to debug it, and found it lives somehwere inside untils version of dbUnit, from what I understand. I can see we are correctly substituting [null] into an actual NULL, prior to the schema comparator. This also explains the verison discrepancy.
Thanks for the update. I'm closing this as appears is not a dbUnit issue. If you find a dbUnit issue, please either create a new bug entry or reopen this one.