DbSanity dbSanity = new DbSanity();
dbSanity.setCheckDefinitionFile(checkFile);
dbSanity.setReportFolder(context.reportFile("dbsanity-report"));
dbSanity.setEnvironment(config.getEnvironment1());
dbSanity.setDefectCountLimit(config.getDefectCountLimit());
dbSanity.setVersionProvider(new ConstantVersionProvider(config.getAppVersion()));
dbSanity.setMetaDataCached(config.isMetaDataCached());
dbSanity.setIgnorableTables(config.getTableExclusionPattern());
if (config.getAppVersion() != null)
dbSanity.setVersionProvider(new ConstantVersionProvider(config.getAppVersion()));
// evaluate DB Sanity results
SanityCheckSuite suite = dbSanity.execute();
if (suite.countErredChecks() > 0)
LOGGER.error("Some checks resulted in SQL errors. " +