DbUnit - Warning: AbstractTableMetaData
我在最新版本 2.4.8 中使用 DbUnit,并且在我的单元测试中收到许多警告,并显示以下消息:
WARN : org.dbunit.dataset.AbstractTableMetaData -
Potential problem found: The configured data type factory
'class org.dbunit.dataset.datatype.DefaultDataTypeFactory'
might cause problems with the current database 'MySQL' (e.g. some datatypes may
not be supported properly). In rare cases you might see this message because the
list of supported database products is incomplete (list=[derby]). If so please
request a java-class update via the forums.If you are using your own
IDataTypeFactory extending DefaultDataTypeFactory, ensure that you override
getValidDbProducts() to specify the supported database products.
所以我想我添加这个(我使用MySQL数据库):
protected void setUpDatabaseConfig(DatabaseConfig config) {
config.setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new MySqlDataTypeFactory());
}
但这无助于避免这些警告。这是怎么回事?
提前感谢您和最好的问候蒂姆。