-
Bug
-
Resolution: Done
-
Major
-
persistence_1.0.0.Alpha5
-
None
I have a Arq Persistence Ext test method which loads YAML formatted data using @DataSet.
In the data file I have a mix of tables with data and 'empty' tables. The empty tables are specified to facilitate their cleaning as they contain data created during the test and affect referential FK constraints.
DBUnit provides for specifying an empty table w/YAML like so where you simply specify the table name and a colon like so:
MY_EMPTY_TABLE_1:
MY_EMPTY_TABLE_2:
When I do that I get the following NPE as it appears Arq persistence dbunit does not do a NULL check when it extracts the columns:
Caused by: java.lang.NullPointerException at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.extractColumns(YamlDataSetProducer.java:139) at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.createTables(YamlDataSetProducer.java:119) at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.produce(YamlDataSetProducer.java:74) at org.dbunit.dataset.CachedDataSet.<init>(CachedDataSet.java:97) at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:60) at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:85) at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:80) at org.jboss.arquillian.persistence.dbunit.dataset.DataSetBuilder.loadYamlDataSet(DataSetBuilder.java:92) at org.jboss.arquillian.persistence.dbunit.dataset.DataSetBuilder.build(DataSetBuilder.java:65)