Package org.databene.dbsanity

Examples of org.databene.dbsanity.DbSanity


      System.out.println("No restrictions apply in the migration");
      return 0;
    }
   
    // make DB Sanity perform the checks
    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. " +
        "If this is not a database connection problem, " +
        "please contact Databene with a problem description");
    else if (suite.getDefectCount() > 0)
View Full Code Here

TOP

Related Classes of org.databene.dbsanity.DbSanity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.