Author: vhalbert(a)redhat.com
Date: 2010-04-09 13:39:12 -0400 (Fri, 09 Apr 2010)
New Revision: 2042
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/client/QueryScenario.java
trunk/test-integration/db/src/main/java/org/teiid/test/client/TestResultsSummary.java
Log:
Teiid-773 - changes to disable embedded type testing and fix the summary property and how
it determines where to place the summary files
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/client/QueryScenario.java
===================================================================
---
trunk/test-integration/db/src/main/java/org/teiid/test/client/QueryScenario.java 2010-04-09
17:38:57 UTC (rev 2041)
+++
trunk/test-integration/db/src/main/java/org/teiid/test/client/QueryScenario.java 2010-04-09
17:39:12 UTC (rev 2042)
@@ -30,6 +30,7 @@
import java.util.Properties;
import org.teiid.test.client.TestProperties.RESULT_MODES;
+import org.teiid.test.framework.ConfigPropertyLoader;
import org.teiid.test.framework.TestLogger;
import org.teiid.test.framework.exception.QueryTestFailedException;
import org.teiid.test.framework.exception.TransactionRuntimeException;
@@ -91,6 +92,7 @@
validateResultsMode(this.props);
+ // TODO: deployprops.loc not needed in remote testing
try {
setupVDBs(this.getProperties());
} catch (IOException e) {
@@ -106,6 +108,12 @@
// property containing the location of
// all the vdbs
+
+ // if disabled, no configuration of the vdb is needed
+ if (ConfigPropertyLoader.getInstance().isDataStoreDisabled()) {
+ return;
+ }
+
String deployPropLoc = props.getProperty("deployprops.loc");
Properties deployProperties = PropertiesUtils.load(deployPropLoc);
Modified:
trunk/test-integration/db/src/main/java/org/teiid/test/client/TestResultsSummary.java
===================================================================
---
trunk/test-integration/db/src/main/java/org/teiid/test/client/TestResultsSummary.java 2010-04-09
17:38:57 UTC (rev 2041)
+++
trunk/test-integration/db/src/main/java/org/teiid/test/client/TestResultsSummary.java 2010-04-09
17:39:12 UTC (rev 2042)
@@ -118,7 +118,13 @@
throw new IOException(
"Summary file already exists: " + summaryFile.getName()); //$NON-NLS-1$
}
+ try {
summaryFile.createNewFile();
+ } catch (IOException ioe) {
+ TestLogger.log("Error creating new summary file: " +
summaryFile.getAbsolutePath());
+ throw ioe;
+ }
+
OutputStream os = new FileOutputStream(summaryFile);
os = new BufferedOutputStream(os);
return new PrintStream(os);
@@ -390,20 +396,21 @@
}
public void printTotals(QueryScenario scenario ) throws Exception {
- String outputDir = scenario.getResultsGenerator().getOutputDir();
+// String outputDir = scenario.getResultsGenerator().getOutputDir();
String scenario_name = scenario.getQueryScenarioIdentifier();
String querysetname = scenario.getQuerySetName();
String summarydir =
ConfigPropertyLoader.getInstance().getProperty(PROP_SUMMARY_PRT_DIR);
- if (summarydir != null) {
- outputDir = summarydir;
- }
+// if (summarydir != null) {
+// outputDir = summarydir;
+// }
PrintStream outputStream = null;
try {
- outputStream = getSummaryStream(outputDir, "Summary_" + querysetname +
"_" + scenario_name, true); //$NON-NLS-1$
+ outputStream = getSummaryStream(summarydir, "Summary_" + querysetname +
"_" + scenario_name, true); //$NON-NLS-1$
} catch (IOException e) {
+ e.printStackTrace();
// logError("Unable to get output stream for file: " +
outputFileName); //$NON-NLS-1$
throw e;
}