[teiid-commits] teiid SVN: r1719 - in trunk/test-integration/db/src/main/java/org/teiid/test/client: ctc and 1 other directory.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Wed Jan 6 12:13:18 EST 2010
Author: vhalbert at redhat.com
Date: 2010-01-06 12:13:18 -0500 (Wed, 06 Jan 2010)
New Revision: 1719
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/TestProperties.java
trunk/test-integration/db/src/main/java/org/teiid/test/client/TestResultsSummary.java
trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/CTCQueryScenario.java
Log:
Teiid 781 - needed to add another qualifier to the summary file name (e.g., query set name) so that duplicates wont occur
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-01-06 16:06:56 UTC (rev 1718)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/client/QueryScenario.java 2010-01-06 17:13:18 UTC (rev 1719)
@@ -39,6 +39,13 @@
*/
public interface QueryScenario {
+
+ /**
+ * Return the name that identifies this query set.
+ * It should use the {@link TestProperties#QUERY_SET_NAME} property to obtain the name.
+ * @return String query set name;
+ */
+ String getQuerySetName();
/**
* Return the identifier for the current scenario
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/client/TestProperties.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/client/TestProperties.java 2010-01-06 16:06:56 UTC (rev 1718)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/client/TestProperties.java 2010-01-06 17:13:18 UTC (rev 1719)
@@ -33,6 +33,15 @@
public static final String PROP_SCENARIO_FILE = "scenariofile";
/**
+ * The {@link #QUERY_SET_NAME} property indicates the name of directory that contains
+ * the set of queries and expected results that will be used. This is referred
+ * to as the <b>query set</b>
+ *
+ * This property should be found in the {@link #PROP_SCENARIO_FILE}.
+ */
+ public static final String QUERY_SET_NAME = "queryset.dir"; //$NON-NLS-1$
+
+ /**
* PROP_RESULT_MODE controls what to do with the execution results.
*
* @see ExpectedResults.RESULT_MODES for the options.
@@ -70,7 +79,9 @@
* files will be written.
*/
public static final String PROP_OUTPUT_DIR = "outputdir"; //$NON-NLS-1$
+
+
}
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-01-06 16:06:56 UTC (rev 1718)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/client/TestResultsSummary.java 2010-01-06 17:13:18 UTC (rev 1719)
@@ -317,6 +317,8 @@
public void printTotals(QueryScenario scenario ) throws Exception {
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) {
@@ -325,20 +327,22 @@
PrintStream outputStream = null;
try {
- outputStream = getSummaryStream(outputDir, "TotalSummary_" + scenario_name, true); //$NON-NLS-1$
+ outputStream = getSummaryStream(outputDir, "Summary_" + querysetname + "_" + scenario_name, true); //$NON-NLS-1$
} catch (IOException e) {
// logError("Unable to get output stream for file: " + outputFileName); //$NON-NLS-1$
throw e;
}
- outputStream.println("Scenario " + scenario_name + " Total Results"); //$NON-NLS-1$
+
+ outputStream.println("Scenario " + scenario_name + " Summary"); //$NON-NLS-1$
+ outputStream.println("Query Set Name " + querysetname); //$NON-NLS-1$
outputStream.println("=================="); //$NON-NLS-1$
outputStream
- .println("Number of Query Sets: " + total_querysets); //$NON-NLS-1$ //$NON-NLS-2$
+ .println("Number of Test Query Sets: " + total_querysets); //$NON-NLS-1$ //$NON-NLS-2$
outputStream.println("=================="); //$NON-NLS-1$
- outputStream.println("Query Sets"); //$NON-NLS-1$
+ outputStream.println("Test Query Set"); //$NON-NLS-1$
outputStream.println("\t" + "Name" + "\t\t" + "Pass" + "\t" + "Fail" + "\t" + "Total"); //$NON-NLS-1$
if (!this.query_sets.isEmpty()) {
Modified: trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/CTCQueryScenario.java
===================================================================
--- trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/CTCQueryScenario.java 2010-01-06 16:06:56 UTC (rev 1718)
+++ trunk/test-integration/db/src/main/java/org/teiid/test/client/ctc/CTCQueryScenario.java 2010-01-06 17:13:18 UTC (rev 1719)
@@ -68,6 +68,7 @@
private Properties props;
private String outputDir = null;
+ private String querySetName = null;
private String scenario_test_name;
@@ -82,6 +83,10 @@
public String getQueryScenarioIdentifier() {
return this.scenario_test_name;
}
+
+ public String getQuerySetName() {
+ return this.querySetName;
+ }
private void setup() {
@@ -89,6 +94,8 @@
TestLogger.logDebug("Perform TestClient Setup");
Properties props = ConfigPropertyLoader.getInstance().getProperties();
+ this.querySetName = props.getProperty(TestProperties.QUERY_SET_NAME, "querysetnamenotdefined");
+
outputDir = props.getProperty(TestProperties.PROP_OUTPUT_DIR, ".");
Assert.assertNotNull("Property " + TestProperties.PROP_OUTPUT_DIR
More information about the teiid-commits
mailing list