Package org.teiid.test.framework.exception

Examples of org.teiid.test.framework.exception.TransactionRuntimeException


    protected void setUp() {

  try {
      reader = new XMLQueryReader(this.getQueryScenarioIdentifier(), this.getProperties());
  } catch (QueryTestFailedException e1) {
        throw new TransactionRuntimeException(e1);
  }

  resultsGen = new XMLGenerateResults(this.getQueryScenarioIdentifier(), this.getProperties());

  if (reader.getQuerySetIDs() == null
    || reader.getQuerySetIDs().isEmpty()) {
      throw new TransactionRuntimeException(
        "The queryreader did not return any queryset ID's to process");
  }

  validateResultsMode(this.getProperties());
View Full Code Here


            tr.getQueryID(), sql, resultSet, resultException,
            this.getExpectedResults(tr.getQuerySetID()).getResultsFile(tr.getQueryID()) );
         
 
      } catch (QueryTestFailedException qtfe) {
          throw new TransactionRuntimeException(qtfe.getMessage());
      }
      }

  } else if (getResultsMode().equalsIgnoreCase(TestProperties.RESULT_MODES.GENERATE)) { //$NON-NLS-1$

      try {
   
      this.getResultsGenerator().generateQueryResultFile(tr.getQuerySetID(),
        tr.getQueryID(), sql, resultSet, resultException, tr.getStatus());
   
      } catch (QueryTestFailedException qtfe) {
    throw new TransactionRuntimeException(qtfe.getMessage());
      }

  } else {
      // just create the error file for any failures
      if (tr.getStatus() == TestResult.RESULT_STATE.TEST_EXCEPTION && !getResultsMode().equalsIgnoreCase(TestProperties.RESULT_MODES.NONE)) {
    try {
        this.getResultsGenerator().generateErrorFile(tr.getQuerySetID(),
          tr.getQueryID(), sql, resultSet, resultException,
          this.getExpectedResults(tr.getQuerySetID()).getResultsFile(tr.getQueryID()) );

    } catch (QueryTestFailedException qtfe) {
        throw new TransactionRuntimeException(qtfe.getMessage());
    }
      }
  }

View Full Code Here

    private void runScenario() throws Exception {
 
 
  String scenario_file = ConfigPropertyLoader.getInstance().getProperty(TestProperties.PROP_SCENARIO_FILE);
  if (scenario_file == null) {
      throw new TransactionRuntimeException(TestProperties.PROP_SCENARIO_FILE + " property was not defined");
  }

  String scenario_name = FileUtils.getBaseFileNameWithoutExtension(scenario_file);
 
  TestLogger.log("Starting scenario " + scenario_name);
View Full Code Here

  try {
      return TransactionFactory.create(ConfigPropertyLoader.getInstance());
  } catch (QueryTestFailedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      throw new TransactionRuntimeException(e);
  }

    }
View Full Code Here

  resultsGen = ClassFactory.createResultsGenerator(args);

  if (reader.getQuerySetIDs() == null
    || reader.getQuerySetIDs().isEmpty()) {
      throw new TransactionRuntimeException(
        "The queryreader did not return any queryset ID's to process");
  }

  validateResultsMode(this.props);
 
View Full Code Here

    public List<QueryTest> getQueries(String querySetID) {
  try {
      return reader.getQueries(querySetID);
  } catch (QueryTestFailedException e) {
      throw new TransactionRuntimeException(e);
  }
    }
View Full Code Here

TOP

Related Classes of org.teiid.test.framework.exception.TransactionRuntimeException

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.