You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/08/12 17:23:08 UTC
svn commit: r232310 [54/92] - in /beehive/trunk/controls/test: common/
infra/gtlf/ infra/gtlf/xsl/ infra/mantis/ infra/tch/ infra/tch/messages/
infra/tch/runtime/ infra/tch/schema/ perf/ perf/bin/ perf/cases/
perf/ctlsrc/org/apache/beehive/controls/per...
Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestMetadataTask.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestMetadataTask.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestMetadataTask.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestMetadataTask.java Fri Aug 12 08:12:28 2005
@@ -1,724 +1,724 @@
-package org.apache.beehive.test.tools.tch.core;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-
-import org.apache.regexp.RE;
-import org.apache.tools.ant.BuildException;
-
-import org.apache.beehive.test.tools.tch.util.CaseInsensitiveStringKey;
-import org.apache.beehive.test.tools.tch.util.TchUtils;
-import org.apache.beehive.test.tools.tch.util.GeneralUtil;
-import org.apache.beehive.test.tools.tch.util.NestedException;
-import org.apache.beehive.test.tools.tch.util.NoopCollection;
-
-/**
- * All the metadata we care about. Ideally would be more easily extensible.
- */
-public class TestMetadataTask
- extends BaseTwoPassTask
- implements RunOnceTask, PropertyReferencer
-{
- private static final String DESCRIPTION = "description";
- private static final String USAGE = "usage";
- private static final String CR_LIST = "crlist";
- private static final String TEST_LEVEL = "testlevel";
- private static final String KNOWN_FAILURE = "knownFailure";
- private static final String SSL_RESTRICTION = "ssl";
- private static final String OS_RESTRICTION = "os";
- private static final String CLIENT_TYPES = "client-types";
- private static final String SECURITY_TYPE = "security-type";
- private static final String JAVA_VERSION = "javaVersion";
-
- private String description = null;
-
- // Collection of Strings
- private Collection conditions = new HashSet();
-
- private String usage = null;
- private String owner = null;
-
- // many databases
- private Collection dbs = null;
-
- private String status = Filter.DEFAULT_STATUS;
- private Collection webapps = null;
- private Collection frequencies = null;
- private Collection testLevels = null;
- private Collection serverModes = null;
- private Collection conversations = null;
- private Collection domains = null;
- private Collection miscInfo = null;
- private CRList crList = null;
- private Boolean knownFailure = null;
- private Boolean sslRestriction = null;
-
- // deprecated
- private OSRestriction osRestriction = null;
-
- // one os, two oses? or os'
- private Collection oses = null;
-
- private JavaRestriction javaRestriction = null;
- private ClientTypes clientTypes = new ClientTypes(true);
- private SecurityType securityType = new SecurityType(true);
-
- private Collection printSet = null;
-
- private boolean hasRun = false;
-
- // static helper methods
- // ==========================================
-
- private static boolean matchesSystemProperty(
- String sysPropName,
- String[] toMatch)
- {
- return TestMetadataTask.matchesSystemProperty(
- sysPropName,
- toMatch,
- true,
- false);
- }
-
- /*package */
- static boolean matchesSystemProperty(
- String sysPropName,
- String[] toMatch,
- boolean useRegex)
- {
- return TestMetadataTask.matchesSystemProperty(
- sysPropName,
- toMatch,
- useRegex,
- false);
- }
-
- private static boolean matchesSystemProperty(
- String sysPropName,
- String[] toMatch,
- boolean useRegex,
- boolean isExcluded)
- {
- String valueToMatch = System.getProperty(sysPropName);
- if (valueToMatch == null)
- return false; // VALIDATION ERROR?
- Collection matches = null;
- if (useRegex)
- {
- // force regular expression, if it is not already one
- String[] regexps = new String[toMatch.length];
- for (int i = 0; i < toMatch.length; i++)
- {
- regexps[i] = turnIntoRegex(toMatch[i]);
- }
- matches =
- GeneralUtil.getRegexMatches(
- regexps,
- new String[] { valueToMatch },
- new NoopCollection(),
- new NoopCollection(),
- RE.MATCH_CASEINDEPENDENT);
- }
- else
- {
- for (int i = 0; i < toMatch.length; i++)
- {
- if (toMatch[i].equals(valueToMatch))
- matches.add(toMatch[i]);
- }
- }
-
- if (isExcluded)
- return matches.isEmpty();
- else
- return !matches.isEmpty();
- }
-
- // simplistic, but should suffice
- private static String turnIntoRegex(String s)
- {
- StringBuffer rtn = new StringBuffer(s);
- if (!s.startsWith(".*"))
- rtn.insert(0, ".*");
- if (!s.endsWith(".*"))
- rtn.append(".*");
- return rtn.toString();
- }
-
- // metadata
- // ==========================================
-
- public void addConfiguredMisc(TextElement inMisc)
- {
- if (inMisc.getText() != null && inMisc.getText().trim().length() > 0)
- {
- miscInfo = new HashSet();
- TchUtils.parseStringToStrings(inMisc.getText().trim(), " ", miscInfo);
- }
- }
-
- public void addConfiguredDB(TextElement inDB)
- {
- if (inDB.getText() != null && inDB.getText().trim().length() > 0)
- {
- dbs = new HashSet();
- TchUtils.parseStringToStrings(inDB.getText().trim(), " ", dbs);
- }
- }
-
- public void addConfiguredDescription(TextElement inDescription)
- {
- if (inDescription.getText() != null
- && inDescription.getText().trim().length() > 0)
- description = inDescription.getText().trim();
- }
-
- public void addConfiguredOwner(TextElement inOwner)
- {
- if (inOwner.getText() != null && inOwner.getText().trim().length() > 0)
- owner = inOwner.getText().trim();
- }
-
- public void addConfiguredDomain(TextElement inDomain)
- {
- if (inDomain.getText() != null && inDomain.getText().trim().length() > 0)
- {
- domains = new HashSet();
- TchUtils.parseStringToStrings(
- inDomain.getText().trim(),
- " ",
- domains);
- }
- }
-
- public void addConfiguredOS(TextElement inOS)
- {
- if (inOS.getText() != null && inOS.getText().trim().length() > 0)
- {
- oses = new HashSet();
- TchUtils.parseStringToStrings(inOS.getText().trim(), " ", oses);
- }
- }
-
- public void addConfiguredCondition(TextElement inCondition)
- {
- String condition = inCondition.getText();
- if (condition != null && condition.trim().length() > 0)
- conditions.add(handleValue(condition.trim()));
- }
-
- public void addConfiguredUsage(TextElement inUsage)
- {
- if (inUsage.getText() != null && inUsage.getText().trim().length() > 0)
- usage = inUsage.getText().trim();
- }
-
- public void addConfiguredTestLevel(TestLevel inTestLevel)
- {
- testLevels = new HashSet();
- testLevels.addAll(inTestLevel.getLevels());
- }
-
- public void addConfiguredFreq(TextElement inFrequencies)
- {
- if (inFrequencies.getText() != null
- && inFrequencies.getText().trim().length() > 0)
- {
- frequencies = new HashSet();
- TchUtils.parseStringToStrings(
- inFrequencies.getText().trim(),
- " ",
- frequencies);
- }
- }
-
- public void addConfiguredWebapps(TextElement inWebapps)
- {
- if (inWebapps.getText() != null
- && inWebapps.getText().trim().length() > 0)
- {
- webapps = new HashSet();
- TchUtils.parseStringToStrings(
- inWebapps.getText().trim(),
- " ",
- webapps);
- }
- }
-
- public void addConfiguredServermode(TextElement inServermodes)
- {
- if (inServermodes.getText() != null
- && inServermodes.getText().trim().length() > 0)
- {
- serverModes = new HashSet();
- TchUtils.parseStringToStrings(
- inServermodes.getText().trim(),
- " ",
- serverModes);
- }
- }
-
- public void addConfiguredStatus(TextElement inStatus)
- {
- if (inStatus.getText() != null && inStatus.getText().trim().length() > 0)
- {
- status = inStatus.getText().trim();
- }
- }
-
- public void addConfiguredConversation(TextElement inConversation)
- {
- if (inConversation.getText() != null
- && inConversation.getText().trim().length() > 0)
- {
- conversations = new HashSet();
- TchUtils.parseStringToStrings(
- inConversation.getText().trim(),
- " ",
- conversations);
- }
- }
-
- public void addConfiguredCRList(CRList inCRList)
- {
- crList = inCRList;
- }
-
- public void addConfiguredKnownFailure(BooleanElement in)
- {
- knownFailure = in.getValue();
- }
-
- public void addConfiguredSSLRestriction(BooleanElement in)
- {
- sslRestriction = in.getValue();
- }
-
- public void addConfiguredOSRestriction(OSRestriction in)
- {
- osRestriction = in;
- }
-
- public void addConfiguredJavaRestriction(JavaRestriction in)
- {
- javaRestriction = in;
- }
-
- public void addConfiguredClientTypes(ClientTypes inClientTypes)
- {
- clientTypes = inClientTypes;
- }
-
- public void addConfiguredSecurityType(SecurityType inSecurityType)
- {
- securityType = inSecurityType;
- }
-
- //provide accessor for the filter to use
-
- /**
- * @return Collection of Strings
- */
- public Collection getConditions()
- {
- return conditions;
- }
-
- public Collection getFrequencies()
- {
- return frequencies;
- }
-
- public Collection getWebapps()
- {
- return webapps;
- }
-
- public Collection getServerModes()
- {
- return serverModes;
- }
-
- public String getOwner()
- {
- return owner;
- }
-
- public Collection getTestLevels()
- {
- return testLevels;
- }
-
- public Collection getOses()
- {
- return oses;
- }
-
- public Collection getDomains()
- {
- return domains;
- }
-
- public String getStatus()
- {
- return status;
- }
-
- public Collection getConversations()
- {
- return conversations;
- }
-
- public Collection getCRList()
- {
- if (crList == null)
- {
- return null;
- }
- return crList.getCRs();
- }
-
- public Boolean getKnownFailure()
- {
- return knownFailure;
- }
-
- public Boolean getSSLRestriction()
- {
- return sslRestriction;
- }
-
- public OSRestriction getOSRestriction()
- {
- return osRestriction;
- }
-
- public JavaRestriction getJavaRestriction()
- {
- return javaRestriction;
- }
-
- public Map getClientTypes()
- {
- return clientTypes.getTypes();
- }
-
- public Collection getDB()
- {
- return dbs;
- }
-
- public Collection getMiscInfo()
- {
- return miscInfo;
- }
-
- public Map getSecurityTypes()
- {
- return securityType.getSecurityTypes();
- }
-
- protected boolean initialize()
- {
- boolean rtn = super.initialize();
- try
- {
- if (!hasRun) //idempotent
- {
- hasRun = true;
- //All this will do is take what nested objects we have, etc.,
- //and log them to the console logger (System.out.println() for now),
- //if a certain flag is set
- setToPrint(); //go and get the properties, set the variables
-
- if (printSet != null)
- {
- log("Test metadata: " + "\n\n");
- if (printSet.contains(DESCRIPTION) && description != null)
- log(DESCRIPTION + "=" + description + "\n\n");
- if (printSet.contains(USAGE) && usage != null)
- log(USAGE + "=" + usage + "\n\n");
- if (printSet.contains(CR_LIST) && crList != null)
- log(CR_LIST + "=" + crList + "\n\n");
- if (printSet.contains(KNOWN_FAILURE))
- log(KNOWN_FAILURE + "=" + knownFailure);
- if (printSet.contains(SSL_RESTRICTION))
- log(SSL_RESTRICTION + "=" + sslRestriction + "\n\n");
- if (printSet.contains(OS_RESTRICTION))
- log(OS_RESTRICTION + "=" + osRestriction + "\n\n");
- if (printSet.contains(CLIENT_TYPES) && clientTypes != null)
- log(CLIENT_TYPES + "=" + clientTypes + "\n\n");
- if (printSet.contains(TEST_LEVEL) && testLevels != null)
- log(TEST_LEVEL + "=" + testLevels + "\n\n");
- if (printSet.contains(SECURITY_TYPE) && securityType != null)
- log(SECURITY_TYPE + "=" + securityType + "\n\n");
- }
- }
- }
- catch (NestedException ne)
- {
- throw new BuildException(ne.getMessage(), ne, getLocation());
- }
- return rtn;
- }
-
- private void setToPrint() throws AntProperties.AntPropertiesException
- {
- printSet = AntProperties.getTestInfo();
- }
-
- public static class TextElement
- {
- private String text;
-
- public void addText(String inText)
- {
- text = inText;
- }
-
- public String getText()
- {
- return text;
- }
- }
-
- public static class BooleanElement
- {
- private Boolean value = null;
-
- public void setValue(String in)
- {
- value = new Boolean(GeneralUtil.parseBoolean(in.trim()));
- }
-
- public Boolean getValue()
- {
- return value;
- }
- }
-
- public static class TestLevel
- {
- private Collection levels = new HashSet();
-
- public void setLevel(String in)
- {
- levels.add(new Integer(Integer.parseInt(in.trim())));
- }
-
- public void setLevels(String in)
- {
- TchUtils.parseStringToIntegers(in, ",", levels);
- }
-
- public Collection getLevels()
- {
- return levels;
- }
- }
-
- public static class CRList
- {
- private Collection crs = null;
-
- public void setIDs(String idString)
- {
- crs = new HashSet();
- TchUtils.parseStringToIntegers(idString, ",", crs);
- }
-
- /**
- * returns a Collection of Integers
- */
- public Collection getCRs()
- {
- return crs;
- }
-
- public String toString()
- {
- return crs.toString();
- }
- }
-
- public static class OSRestriction
- {
- private Collection osSet = new HashSet();
- //of Strings, of the OS names of interest
- private boolean excluded = false;
- //whether or not the above set is the set of OSs *not* to support
-
- public void setNames(String nameString)
- {
- TchUtils.parseStringToStrings(nameString, ",", osSet);
- }
-
- public Collection getOSSet()
- {
- return osSet;
- }
-
- public void setExcluded(boolean in)
- {
- excluded = in;
- }
-
- public boolean isExcluded()
- {
- return excluded;
- }
-
- public boolean pass(String osNameSysProp)
- {
- if (getOSSet().isEmpty())
- return true;
-
- return TestMetadataTask.matchesSystemProperty(
- osNameSysProp,
- (String[])getOSSet().toArray(new String[] {}),
- true,
- isExcluded());
- }
- }
-
- public static class JavaRestriction
- {
- // of Strings, of the java versions of interest
- private Collection javaVersion = new HashSet();
-
- // whether or not the above set is the set of java versions *not* to support
- private boolean excluded = false;
-
- public void setVersions(String versionsString)
- {
- TchUtils.parseStringToStrings(versionsString, ",", javaVersion);
- }
-
- public Collection getJavaVersionSet()
- {
- return javaVersion;
- }
-
- public void setExcluded(boolean in)
- {
- excluded = in;
- }
-
- public boolean isExcluded()
- {
- return excluded;
- }
-
- public boolean passVersion(String versionSysPropName)
- {
- if (getJavaVersionSet().isEmpty())
- return true;
-
- return TestMetadataTask.matchesSystemProperty(
- versionSysPropName,
- (String[])getJavaVersionSet().toArray(new String[] {}),
- true,
- isExcluded());
- }
- }
-
- public static class ClientTypes
- {
-
- private static final CaseInsensitiveStringKey JDK_CLIENT =
- new CaseInsensitiveStringKey("jdkclient");
-
- private static final CaseInsensitiveStringKey THIN_CLIENT =
- new CaseInsensitiveStringKey("thinclient");
-
- private static final CaseInsensitiveStringKey THIN_CLIENT_STRICT =
- new CaseInsensitiveStringKey("thinclientstrict");
-
- private Map types = new HashMap();
-
- public ClientTypes()
- {
- this(false);
- }
-
- public ClientTypes(boolean init)
- {
- if (init)
- setDefaults();
- }
-
- public void setDefaults()
- {
- types.put(JDK_CLIENT, new Boolean(true));
- types.put(THIN_CLIENT, new Boolean(true));
- types.put(THIN_CLIENT_STRICT, new Boolean(true));
- }
-
- public void setJDKClient(String in)
- {
- types.put(JDK_CLIENT, new Boolean(GeneralUtil.parseBoolean(in.trim())));
- }
-
- public void setThinClient(String in)
- {
- types.put(THIN_CLIENT, new Boolean(GeneralUtil.parseBoolean(in.trim())));
- }
-
- public void setThinClientStrict(String in)
- {
- types.put(
- THIN_CLIENT_STRICT,
- new Boolean(GeneralUtil.parseBoolean(in.trim())));
- }
-
- public Map getTypes()
- {
- return types;
- }
- }
-
- public static class SecurityType
- {
- private Map types = new HashMap();
-
- private static final CaseInsensitiveStringKey SECURITY_61 =
- new CaseInsensitiveStringKey("Security61");
- private static final CaseInsensitiveStringKey SECURITY_70 =
- new CaseInsensitiveStringKey("Security70");
-
- public SecurityType()
- {
- this(false);
- }
-
- public SecurityType(boolean init)
- {
- if (init)
- setDefaults();
- }
-
- public void setDefaults()
- {
- types.put(SECURITY_61, new Boolean(true));
- types.put(SECURITY_70, new Boolean(true));
- }
-
- public void setSecurity61(String in)
- {
- types.put(SECURITY_61, new Boolean(GeneralUtil.parseBoolean(in.trim())));
- }
-
- public void setSecurity70(String in)
- {
- types.put(SECURITY_70, new Boolean(GeneralUtil.parseBoolean(in.trim())));
- }
-
- public Map getSecurityTypes()
- {
- return types;
- }
- }
-}
+package org.apache.beehive.test.tools.tch.core;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+import org.apache.regexp.RE;
+import org.apache.tools.ant.BuildException;
+
+import org.apache.beehive.test.tools.tch.util.CaseInsensitiveStringKey;
+import org.apache.beehive.test.tools.tch.util.TchUtils;
+import org.apache.beehive.test.tools.tch.util.GeneralUtil;
+import org.apache.beehive.test.tools.tch.util.NestedException;
+import org.apache.beehive.test.tools.tch.util.NoopCollection;
+
+/**
+ * All the metadata we care about. Ideally would be more easily extensible.
+ */
+public class TestMetadataTask
+ extends BaseTwoPassTask
+ implements RunOnceTask, PropertyReferencer
+{
+ private static final String DESCRIPTION = "description";
+ private static final String USAGE = "usage";
+ private static final String CR_LIST = "crlist";
+ private static final String TEST_LEVEL = "testlevel";
+ private static final String KNOWN_FAILURE = "knownFailure";
+ private static final String SSL_RESTRICTION = "ssl";
+ private static final String OS_RESTRICTION = "os";
+ private static final String CLIENT_TYPES = "client-types";
+ private static final String SECURITY_TYPE = "security-type";
+ private static final String JAVA_VERSION = "javaVersion";
+
+ private String description = null;
+
+ // Collection of Strings
+ private Collection conditions = new HashSet();
+
+ private String usage = null;
+ private String owner = null;
+
+ // many databases
+ private Collection dbs = null;
+
+ private String status = Filter.DEFAULT_STATUS;
+ private Collection webapps = null;
+ private Collection frequencies = null;
+ private Collection testLevels = null;
+ private Collection serverModes = null;
+ private Collection conversations = null;
+ private Collection domains = null;
+ private Collection miscInfo = null;
+ private CRList crList = null;
+ private Boolean knownFailure = null;
+ private Boolean sslRestriction = null;
+
+ // deprecated
+ private OSRestriction osRestriction = null;
+
+ // one os, two oses? or os'
+ private Collection oses = null;
+
+ private JavaRestriction javaRestriction = null;
+ private ClientTypes clientTypes = new ClientTypes(true);
+ private SecurityType securityType = new SecurityType(true);
+
+ private Collection printSet = null;
+
+ private boolean hasRun = false;
+
+ // static helper methods
+ // ==========================================
+
+ private static boolean matchesSystemProperty(
+ String sysPropName,
+ String[] toMatch)
+ {
+ return TestMetadataTask.matchesSystemProperty(
+ sysPropName,
+ toMatch,
+ true,
+ false);
+ }
+
+ /*package */
+ static boolean matchesSystemProperty(
+ String sysPropName,
+ String[] toMatch,
+ boolean useRegex)
+ {
+ return TestMetadataTask.matchesSystemProperty(
+ sysPropName,
+ toMatch,
+ useRegex,
+ false);
+ }
+
+ private static boolean matchesSystemProperty(
+ String sysPropName,
+ String[] toMatch,
+ boolean useRegex,
+ boolean isExcluded)
+ {
+ String valueToMatch = System.getProperty(sysPropName);
+ if (valueToMatch == null)
+ return false; // VALIDATION ERROR?
+ Collection matches = null;
+ if (useRegex)
+ {
+ // force regular expression, if it is not already one
+ String[] regexps = new String[toMatch.length];
+ for (int i = 0; i < toMatch.length; i++)
+ {
+ regexps[i] = turnIntoRegex(toMatch[i]);
+ }
+ matches =
+ GeneralUtil.getRegexMatches(
+ regexps,
+ new String[] { valueToMatch },
+ new NoopCollection(),
+ new NoopCollection(),
+ RE.MATCH_CASEINDEPENDENT);
+ }
+ else
+ {
+ for (int i = 0; i < toMatch.length; i++)
+ {
+ if (toMatch[i].equals(valueToMatch))
+ matches.add(toMatch[i]);
+ }
+ }
+
+ if (isExcluded)
+ return matches.isEmpty();
+ else
+ return !matches.isEmpty();
+ }
+
+ // simplistic, but should suffice
+ private static String turnIntoRegex(String s)
+ {
+ StringBuffer rtn = new StringBuffer(s);
+ if (!s.startsWith(".*"))
+ rtn.insert(0, ".*");
+ if (!s.endsWith(".*"))
+ rtn.append(".*");
+ return rtn.toString();
+ }
+
+ // metadata
+ // ==========================================
+
+ public void addConfiguredMisc(TextElement inMisc)
+ {
+ if (inMisc.getText() != null && inMisc.getText().trim().length() > 0)
+ {
+ miscInfo = new HashSet();
+ TchUtils.parseStringToStrings(inMisc.getText().trim(), " ", miscInfo);
+ }
+ }
+
+ public void addConfiguredDB(TextElement inDB)
+ {
+ if (inDB.getText() != null && inDB.getText().trim().length() > 0)
+ {
+ dbs = new HashSet();
+ TchUtils.parseStringToStrings(inDB.getText().trim(), " ", dbs);
+ }
+ }
+
+ public void addConfiguredDescription(TextElement inDescription)
+ {
+ if (inDescription.getText() != null
+ && inDescription.getText().trim().length() > 0)
+ description = inDescription.getText().trim();
+ }
+
+ public void addConfiguredOwner(TextElement inOwner)
+ {
+ if (inOwner.getText() != null && inOwner.getText().trim().length() > 0)
+ owner = inOwner.getText().trim();
+ }
+
+ public void addConfiguredDomain(TextElement inDomain)
+ {
+ if (inDomain.getText() != null && inDomain.getText().trim().length() > 0)
+ {
+ domains = new HashSet();
+ TchUtils.parseStringToStrings(
+ inDomain.getText().trim(),
+ " ",
+ domains);
+ }
+ }
+
+ public void addConfiguredOS(TextElement inOS)
+ {
+ if (inOS.getText() != null && inOS.getText().trim().length() > 0)
+ {
+ oses = new HashSet();
+ TchUtils.parseStringToStrings(inOS.getText().trim(), " ", oses);
+ }
+ }
+
+ public void addConfiguredCondition(TextElement inCondition)
+ {
+ String condition = inCondition.getText();
+ if (condition != null && condition.trim().length() > 0)
+ conditions.add(handleValue(condition.trim()));
+ }
+
+ public void addConfiguredUsage(TextElement inUsage)
+ {
+ if (inUsage.getText() != null && inUsage.getText().trim().length() > 0)
+ usage = inUsage.getText().trim();
+ }
+
+ public void addConfiguredTestLevel(TestLevel inTestLevel)
+ {
+ testLevels = new HashSet();
+ testLevels.addAll(inTestLevel.getLevels());
+ }
+
+ public void addConfiguredFreq(TextElement inFrequencies)
+ {
+ if (inFrequencies.getText() != null
+ && inFrequencies.getText().trim().length() > 0)
+ {
+ frequencies = new HashSet();
+ TchUtils.parseStringToStrings(
+ inFrequencies.getText().trim(),
+ " ",
+ frequencies);
+ }
+ }
+
+ public void addConfiguredWebapps(TextElement inWebapps)
+ {
+ if (inWebapps.getText() != null
+ && inWebapps.getText().trim().length() > 0)
+ {
+ webapps = new HashSet();
+ TchUtils.parseStringToStrings(
+ inWebapps.getText().trim(),
+ " ",
+ webapps);
+ }
+ }
+
+ public void addConfiguredServermode(TextElement inServermodes)
+ {
+ if (inServermodes.getText() != null
+ && inServermodes.getText().trim().length() > 0)
+ {
+ serverModes = new HashSet();
+ TchUtils.parseStringToStrings(
+ inServermodes.getText().trim(),
+ " ",
+ serverModes);
+ }
+ }
+
+ public void addConfiguredStatus(TextElement inStatus)
+ {
+ if (inStatus.getText() != null && inStatus.getText().trim().length() > 0)
+ {
+ status = inStatus.getText().trim();
+ }
+ }
+
+ public void addConfiguredConversation(TextElement inConversation)
+ {
+ if (inConversation.getText() != null
+ && inConversation.getText().trim().length() > 0)
+ {
+ conversations = new HashSet();
+ TchUtils.parseStringToStrings(
+ inConversation.getText().trim(),
+ " ",
+ conversations);
+ }
+ }
+
+ public void addConfiguredCRList(CRList inCRList)
+ {
+ crList = inCRList;
+ }
+
+ public void addConfiguredKnownFailure(BooleanElement in)
+ {
+ knownFailure = in.getValue();
+ }
+
+ public void addConfiguredSSLRestriction(BooleanElement in)
+ {
+ sslRestriction = in.getValue();
+ }
+
+ public void addConfiguredOSRestriction(OSRestriction in)
+ {
+ osRestriction = in;
+ }
+
+ public void addConfiguredJavaRestriction(JavaRestriction in)
+ {
+ javaRestriction = in;
+ }
+
+ public void addConfiguredClientTypes(ClientTypes inClientTypes)
+ {
+ clientTypes = inClientTypes;
+ }
+
+ public void addConfiguredSecurityType(SecurityType inSecurityType)
+ {
+ securityType = inSecurityType;
+ }
+
+ //provide accessor for the filter to use
+
+ /**
+ * @return Collection of Strings
+ */
+ public Collection getConditions()
+ {
+ return conditions;
+ }
+
+ public Collection getFrequencies()
+ {
+ return frequencies;
+ }
+
+ public Collection getWebapps()
+ {
+ return webapps;
+ }
+
+ public Collection getServerModes()
+ {
+ return serverModes;
+ }
+
+ public String getOwner()
+ {
+ return owner;
+ }
+
+ public Collection getTestLevels()
+ {
+ return testLevels;
+ }
+
+ public Collection getOses()
+ {
+ return oses;
+ }
+
+ public Collection getDomains()
+ {
+ return domains;
+ }
+
+ public String getStatus()
+ {
+ return status;
+ }
+
+ public Collection getConversations()
+ {
+ return conversations;
+ }
+
+ public Collection getCRList()
+ {
+ if (crList == null)
+ {
+ return null;
+ }
+ return crList.getCRs();
+ }
+
+ public Boolean getKnownFailure()
+ {
+ return knownFailure;
+ }
+
+ public Boolean getSSLRestriction()
+ {
+ return sslRestriction;
+ }
+
+ public OSRestriction getOSRestriction()
+ {
+ return osRestriction;
+ }
+
+ public JavaRestriction getJavaRestriction()
+ {
+ return javaRestriction;
+ }
+
+ public Map getClientTypes()
+ {
+ return clientTypes.getTypes();
+ }
+
+ public Collection getDB()
+ {
+ return dbs;
+ }
+
+ public Collection getMiscInfo()
+ {
+ return miscInfo;
+ }
+
+ public Map getSecurityTypes()
+ {
+ return securityType.getSecurityTypes();
+ }
+
+ protected boolean initialize()
+ {
+ boolean rtn = super.initialize();
+ try
+ {
+ if (!hasRun) //idempotent
+ {
+ hasRun = true;
+ //All this will do is take what nested objects we have, etc.,
+ //and log them to the console logger (System.out.println() for now),
+ //if a certain flag is set
+ setToPrint(); //go and get the properties, set the variables
+
+ if (printSet != null)
+ {
+ log("Test metadata: " + "\n\n");
+ if (printSet.contains(DESCRIPTION) && description != null)
+ log(DESCRIPTION + "=" + description + "\n\n");
+ if (printSet.contains(USAGE) && usage != null)
+ log(USAGE + "=" + usage + "\n\n");
+ if (printSet.contains(CR_LIST) && crList != null)
+ log(CR_LIST + "=" + crList + "\n\n");
+ if (printSet.contains(KNOWN_FAILURE))
+ log(KNOWN_FAILURE + "=" + knownFailure);
+ if (printSet.contains(SSL_RESTRICTION))
+ log(SSL_RESTRICTION + "=" + sslRestriction + "\n\n");
+ if (printSet.contains(OS_RESTRICTION))
+ log(OS_RESTRICTION + "=" + osRestriction + "\n\n");
+ if (printSet.contains(CLIENT_TYPES) && clientTypes != null)
+ log(CLIENT_TYPES + "=" + clientTypes + "\n\n");
+ if (printSet.contains(TEST_LEVEL) && testLevels != null)
+ log(TEST_LEVEL + "=" + testLevels + "\n\n");
+ if (printSet.contains(SECURITY_TYPE) && securityType != null)
+ log(SECURITY_TYPE + "=" + securityType + "\n\n");
+ }
+ }
+ }
+ catch (NestedException ne)
+ {
+ throw new BuildException(ne.getMessage(), ne, getLocation());
+ }
+ return rtn;
+ }
+
+ private void setToPrint() throws AntProperties.AntPropertiesException
+ {
+ printSet = AntProperties.getTestInfo();
+ }
+
+ public static class TextElement
+ {
+ private String text;
+
+ public void addText(String inText)
+ {
+ text = inText;
+ }
+
+ public String getText()
+ {
+ return text;
+ }
+ }
+
+ public static class BooleanElement
+ {
+ private Boolean value = null;
+
+ public void setValue(String in)
+ {
+ value = new Boolean(GeneralUtil.parseBoolean(in.trim()));
+ }
+
+ public Boolean getValue()
+ {
+ return value;
+ }
+ }
+
+ public static class TestLevel
+ {
+ private Collection levels = new HashSet();
+
+ public void setLevel(String in)
+ {
+ levels.add(new Integer(Integer.parseInt(in.trim())));
+ }
+
+ public void setLevels(String in)
+ {
+ TchUtils.parseStringToIntegers(in, ",", levels);
+ }
+
+ public Collection getLevels()
+ {
+ return levels;
+ }
+ }
+
+ public static class CRList
+ {
+ private Collection crs = null;
+
+ public void setIDs(String idString)
+ {
+ crs = new HashSet();
+ TchUtils.parseStringToIntegers(idString, ",", crs);
+ }
+
+ /**
+ * returns a Collection of Integers
+ */
+ public Collection getCRs()
+ {
+ return crs;
+ }
+
+ public String toString()
+ {
+ return crs.toString();
+ }
+ }
+
+ public static class OSRestriction
+ {
+ private Collection osSet = new HashSet();
+ //of Strings, of the OS names of interest
+ private boolean excluded = false;
+ //whether or not the above set is the set of OSs *not* to support
+
+ public void setNames(String nameString)
+ {
+ TchUtils.parseStringToStrings(nameString, ",", osSet);
+ }
+
+ public Collection getOSSet()
+ {
+ return osSet;
+ }
+
+ public void setExcluded(boolean in)
+ {
+ excluded = in;
+ }
+
+ public boolean isExcluded()
+ {
+ return excluded;
+ }
+
+ public boolean pass(String osNameSysProp)
+ {
+ if (getOSSet().isEmpty())
+ return true;
+
+ return TestMetadataTask.matchesSystemProperty(
+ osNameSysProp,
+ (String[])getOSSet().toArray(new String[] {}),
+ true,
+ isExcluded());
+ }
+ }
+
+ public static class JavaRestriction
+ {
+ // of Strings, of the java versions of interest
+ private Collection javaVersion = new HashSet();
+
+ // whether or not the above set is the set of java versions *not* to support
+ private boolean excluded = false;
+
+ public void setVersions(String versionsString)
+ {
+ TchUtils.parseStringToStrings(versionsString, ",", javaVersion);
+ }
+
+ public Collection getJavaVersionSet()
+ {
+ return javaVersion;
+ }
+
+ public void setExcluded(boolean in)
+ {
+ excluded = in;
+ }
+
+ public boolean isExcluded()
+ {
+ return excluded;
+ }
+
+ public boolean passVersion(String versionSysPropName)
+ {
+ if (getJavaVersionSet().isEmpty())
+ return true;
+
+ return TestMetadataTask.matchesSystemProperty(
+ versionSysPropName,
+ (String[])getJavaVersionSet().toArray(new String[] {}),
+ true,
+ isExcluded());
+ }
+ }
+
+ public static class ClientTypes
+ {
+
+ private static final CaseInsensitiveStringKey JDK_CLIENT =
+ new CaseInsensitiveStringKey("jdkclient");
+
+ private static final CaseInsensitiveStringKey THIN_CLIENT =
+ new CaseInsensitiveStringKey("thinclient");
+
+ private static final CaseInsensitiveStringKey THIN_CLIENT_STRICT =
+ new CaseInsensitiveStringKey("thinclientstrict");
+
+ private Map types = new HashMap();
+
+ public ClientTypes()
+ {
+ this(false);
+ }
+
+ public ClientTypes(boolean init)
+ {
+ if (init)
+ setDefaults();
+ }
+
+ public void setDefaults()
+ {
+ types.put(JDK_CLIENT, new Boolean(true));
+ types.put(THIN_CLIENT, new Boolean(true));
+ types.put(THIN_CLIENT_STRICT, new Boolean(true));
+ }
+
+ public void setJDKClient(String in)
+ {
+ types.put(JDK_CLIENT, new Boolean(GeneralUtil.parseBoolean(in.trim())));
+ }
+
+ public void setThinClient(String in)
+ {
+ types.put(THIN_CLIENT, new Boolean(GeneralUtil.parseBoolean(in.trim())));
+ }
+
+ public void setThinClientStrict(String in)
+ {
+ types.put(
+ THIN_CLIENT_STRICT,
+ new Boolean(GeneralUtil.parseBoolean(in.trim())));
+ }
+
+ public Map getTypes()
+ {
+ return types;
+ }
+ }
+
+ public static class SecurityType
+ {
+ private Map types = new HashMap();
+
+ private static final CaseInsensitiveStringKey SECURITY_61 =
+ new CaseInsensitiveStringKey("Security61");
+ private static final CaseInsensitiveStringKey SECURITY_70 =
+ new CaseInsensitiveStringKey("Security70");
+
+ public SecurityType()
+ {
+ this(false);
+ }
+
+ public SecurityType(boolean init)
+ {
+ if (init)
+ setDefaults();
+ }
+
+ public void setDefaults()
+ {
+ types.put(SECURITY_61, new Boolean(true));
+ types.put(SECURITY_70, new Boolean(true));
+ }
+
+ public void setSecurity61(String in)
+ {
+ types.put(SECURITY_61, new Boolean(GeneralUtil.parseBoolean(in.trim())));
+ }
+
+ public void setSecurity70(String in)
+ {
+ types.put(SECURITY_70, new Boolean(GeneralUtil.parseBoolean(in.trim())));
+ }
+
+ public Map getSecurityTypes()
+ {
+ return types;
+ }
+ }
+}
Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestMetadataTask.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestMultiLevelHelper.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestMultiLevelHelper.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestMultiLevelHelper.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestMultiLevelHelper.java Fri Aug 12 08:12:28 2005
@@ -1,351 +1,351 @@
-package org.apache.beehive.test.tools.tch.core;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
-
-import org.apache.beehive.test.tools.tch.core.configuration.InvalidationManager;
-import org.apache.beehive.test.tools.tch.core.configuration.NonfatalValidationAggregate;
-import org.apache.beehive.test.tools.tch.core.configuration.NonfatalValidationException;
-import org.apache.beehive.test.tools.tch.core.configuration.ProcessManagementConfigurationException;
-import org.apache.beehive.test.tools.tch.core.process.ProcessEngine;
-import org.apache.beehive.test.tools.tch.core.process.ProcessRegistry;
-import org.apache.beehive.test.tools.tch.core.test.BasicInternalParameters;
-import org.apache.beehive.test.tools.tch.core.test.InternalParameters;
-import org.apache.beehive.test.tools.tch.logger.LoggerSingleton;
-import org.apache.beehive.test.tools.tch.util.TchConstants;
-import org.apache.beehive.test.tools.tch.util.TestResult;
-import org.apache.beehive.test.tools.tch.util.TestResultAdapter;
-import org.apache.beehive.test.tools.tch.util.TestResultBean;
-
-/**
- * Helper class used for test execution. Mainly encapsulates features required
- * for test execution and allows these to be set and propogated more easily.
- *
- * Provides access to the following test features:
- * <li>access to the {@link ProcessEngine}
- * <li>access to <process> tasks mapped to the test
- * <li>access to <test-parameter> tasks mapped to the test
- * <li>access to mapped test parameters
- * <li>access to shared state registry
- */
-public class TestMultiLevelHelper
- implements ParamContainer, ProcessEngineContainer, PropertyReferencer
-{
- public static String sep = System.getProperty("line.separator");
-
- private Integer testTimeoutSeconds = null;
- private String testunit;
-
- private ProcessEngine processEngine = null;
-
- private ProcessTask defaultProcessTask = null;
-
- private Collection paramTasks = new ArrayList();
- private Collection processTasks = new ArrayList();
-
- private Collection propRefs = new ArrayList();
-
- private Collection tasksToValidate = new ArrayList();
-
- //private NonfatalValidationAggregate nva = new NonfatalValidationAggregate();
- private InvalidationManager invalidationManager = new InvalidationManager();
-
- private TestMetadataTask metadataTask = null;
-
- //This is not really accessed here, but it handed to many child tasks of different types
- private ProcessRegistry processRegistry = ProcessRegistry.getRegistry();
-
- private SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
- //Custom task names are scoped by the AbstractTestNodeTask parent, so each ATNT (and hence TMH) has one registry
-
- public Task handleTask(Task task)
- {
- if (task instanceof PropertyReferencer)
- {
- propRefs.add(task);
- }
-
- if (!(task instanceof AbstractTestTask))
- //these are taken care of separately, skip up the chain
- {
- tasksToValidate.add(task);
- }
-
- if (task instanceof ParamTask)
- {
- paramTasks.add(task);
- }
- else
- {
- if (task instanceof ProcessTask)
- {
- ((ProcessTask)task).setProcessRegistry(processRegistry);
- processTasks.add(task);
- }
- else
- {
- if (task instanceof TestMetadataTask)
- {
- metadataTask = (TestMetadataTask)task;
- return task; //might still need to be handled
- }
- else
- {
- if (task instanceof AnythingTask)
- {
- AnythingTask anythingTask = (AnythingTask)task;
- anythingTask.setProcessEngineContainer(this);
- anythingTask.setSharedStateRegistry(sharedStateRegistry);
- return task;
- }
- else
- {
- return task;
- }
- }
- }
- }
- return null; //task handled
- }
-
- /**
- * Set the timeout setting for the test
- *
- * @param in number of seconds
- */
- public void setTestTimeoutSeconds(Integer in)
- {
- testTimeoutSeconds = in;
- }
-
- /**
- * Get the test timeout setting
- *
- * @return Integer timeout number of seconds
- */
- public Integer getTestTimeoutSeconds()
- {
- return testTimeoutSeconds;
- }
-
- public InternalParameters getParameters()
- {
- InternalParameters params = new BasicInternalParameters();
- for (Iterator iter = paramTasks.iterator(); iter.hasNext();)
- {
- ParamTask pTask = (ParamTask)iter.next();
- params.setParam(pTask.getName(), pTask.getValue());
- }
- return params;
- }
-
- public Collection getUsedProps()
- {
- Collection props = new ArrayList();
- for (Iterator iter = propRefs.iterator(); iter.hasNext();)
- {
- PropertyReferencer pr = (PropertyReferencer)iter.next();
- props.addAll(pr.getUsedProps());
- }
- return props;
- }
-
- public void setTestUnit(String in)
- {
- testunit = in;
- }
-
- public String getTestUnit()
- {
- return testunit;
- }
-
- public TestMetadataTask getMetadataTask()
- {
- return metadataTask;
- }
-
- public final Collection getProcessTasks()
- {
- //org.apache.beehive.test.tools.tch.util.DebugLogger.log("TestMultiLevelHelper.getProcessTasks: processTasks are: "+processTasks);
- return processTasks;
- }
-
- public Collection getAllProcessTasks()
- {
- return getProcessTasks();
- }
-
- public String getDefaultProcessName()
- {
- if (defaultProcessTask == null)
- {
- return null;
- }
- else
- {
- return (String)defaultProcessTask.getNames().iterator().next();
- }
- }
-
- /**
- * To be called only if nothing declared default process
- * @param parent could be null (needed for zero case)
- */
-
- public String getSingleProcessName()
- {
- if (numProcessTasks() == 1)
- {
- return (String) ((ProcessTask)getProcessTasks().iterator().next())
- .getNames()
- .iterator()
- .next();
- }
- return null;
- }
-
- public int numProcessTasks()
- {
- return getProcessTasks().size();
- }
-
- public void setDefaultProcessTask()
- throws ProcessManagementConfigurationException
- {
- if (defaultProcessTask == null)
- {
- for (Iterator iter = processTasks.iterator(); iter.hasNext();)
- {
- ProcessTask processTask = (ProcessTask)iter.next();
- if (processTask.isDefault())
- {
- if (defaultProcessTask != null)
- {
- //VALIDATION ERROR
- Map params = new HashMap(2);
- params.put(
- ErrorMessageConstants.PROCESS,
- defaultProcessTask.getNames());
- params.put(
- ErrorMessageConstants.OTHERPROCESS,
- processTask.getNames());
- invalidate(
- new NonfatalValidationException(
- ErrorMessageConstants.MULTIPLE_DEFAULT_PROCESS_ERROR_CODE,
- params));
- }
- else
- {
- defaultProcessTask = processTask;
- }
- }
- }
- }
- }
-
- /**
- * This must be called only after all the
- * process tasks have been initialized
- */
-
- public void setProcessEngine(ProcessProvider pp)
- {
- try
- {
- processEngine = new ProcessEngine(pp.getName(), pp, getProcessRegistry());
- }
- catch (NonfatalValidationException ex)
- {
- invalidate(ex);
- }
- }
-
- public ProcessEngine getProcessEngine()
- {
- if (processEngine == null)
- {
- throw new BuildException(
- "ProcessEngine is null. getProcessEngine() is being called too early, "
- + "must happen after setProcessEngine()");
- }
- return processEngine;
- }
-
- public ProcessRegistry getProcessRegistry()
- {
- return processRegistry;
- }
-
- /**
- * Log a
- * @param name
- * @param message
- */
- public static void logInvalidationBatch(String name, String message)
- {
- TestResultBean result =
- new TestResultAdapter(TchConstants.INVALIDATION_BATCH_LEVEL_INT);
- result.setName(name);
- result.setOutputMsg(message);
- logResult(result);
- }
-
- public static void logResult(TestResult tr)
- {
- LoggerSingleton.getLogger().log(tr);
- }
-
- public InvalidationManager getInvalidationManager()
- {
- InvalidationManager newMan = new InvalidationManager();
- newMan.addInvalidation(invalidationManager);
-
- for (Iterator iter = tasksToValidate.iterator(); iter.hasNext();)
- {
- Object o = iter.next();
- if (o instanceof BaseTask)
- {
- newMan.addInvalidation(((BaseTask)o).getNonfatalValidationAggregate());
- }
- }
- return newMan;
- }
-
- protected void invalidate(NonfatalValidationException ex)
- {
- invalidationManager.addInvalidation(ex);
- }
-
- /**
- * A simple flat, lazy Registry for holding a Map instance per name
- * Local, not global
- */
-
- public static class SharedStateRegistry
- {
- private Map registry = new HashMap();
-
- public Map getSharedState(String name)
- {
- Map sharedState = null;
- if (registry.containsKey(name))
- {
- sharedState = (Map)registry.get(name);
- }
- else
- {
- sharedState = new HashMap();
- registry.put(name, sharedState);
- }
- return sharedState;
- }
- }
-
-}
+package org.apache.beehive.test.tools.tch.core;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+import org.apache.beehive.test.tools.tch.core.configuration.InvalidationManager;
+import org.apache.beehive.test.tools.tch.core.configuration.NonfatalValidationAggregate;
+import org.apache.beehive.test.tools.tch.core.configuration.NonfatalValidationException;
+import org.apache.beehive.test.tools.tch.core.configuration.ProcessManagementConfigurationException;
+import org.apache.beehive.test.tools.tch.core.process.ProcessEngine;
+import org.apache.beehive.test.tools.tch.core.process.ProcessRegistry;
+import org.apache.beehive.test.tools.tch.core.test.BasicInternalParameters;
+import org.apache.beehive.test.tools.tch.core.test.InternalParameters;
+import org.apache.beehive.test.tools.tch.logger.LoggerSingleton;
+import org.apache.beehive.test.tools.tch.util.TchConstants;
+import org.apache.beehive.test.tools.tch.util.TestResult;
+import org.apache.beehive.test.tools.tch.util.TestResultAdapter;
+import org.apache.beehive.test.tools.tch.util.TestResultBean;
+
+/**
+ * Helper class used for test execution. Mainly encapsulates features required
+ * for test execution and allows these to be set and propogated more easily.
+ *
+ * Provides access to the following test features:
+ * <li>access to the {@link ProcessEngine}
+ * <li>access to <process> tasks mapped to the test
+ * <li>access to <test-parameter> tasks mapped to the test
+ * <li>access to mapped test parameters
+ * <li>access to shared state registry
+ */
+public class TestMultiLevelHelper
+ implements ParamContainer, ProcessEngineContainer, PropertyReferencer
+{
+ public static String sep = System.getProperty("line.separator");
+
+ private Integer testTimeoutSeconds = null;
+ private String testunit;
+
+ private ProcessEngine processEngine = null;
+
+ private ProcessTask defaultProcessTask = null;
+
+ private Collection paramTasks = new ArrayList();
+ private Collection processTasks = new ArrayList();
+
+ private Collection propRefs = new ArrayList();
+
+ private Collection tasksToValidate = new ArrayList();
+
+ //private NonfatalValidationAggregate nva = new NonfatalValidationAggregate();
+ private InvalidationManager invalidationManager = new InvalidationManager();
+
+ private TestMetadataTask metadataTask = null;
+
+ //This is not really accessed here, but it handed to many child tasks of different types
+ private ProcessRegistry processRegistry = ProcessRegistry.getRegistry();
+
+ private SharedStateRegistry sharedStateRegistry = new SharedStateRegistry();
+ //Custom task names are scoped by the AbstractTestNodeTask parent, so each ATNT (and hence TMH) has one registry
+
+ public Task handleTask(Task task)
+ {
+ if (task instanceof PropertyReferencer)
+ {
+ propRefs.add(task);
+ }
+
+ if (!(task instanceof AbstractTestTask))
+ //these are taken care of separately, skip up the chain
+ {
+ tasksToValidate.add(task);
+ }
+
+ if (task instanceof ParamTask)
+ {
+ paramTasks.add(task);
+ }
+ else
+ {
+ if (task instanceof ProcessTask)
+ {
+ ((ProcessTask)task).setProcessRegistry(processRegistry);
+ processTasks.add(task);
+ }
+ else
+ {
+ if (task instanceof TestMetadataTask)
+ {
+ metadataTask = (TestMetadataTask)task;
+ return task; //might still need to be handled
+ }
+ else
+ {
+ if (task instanceof AnythingTask)
+ {
+ AnythingTask anythingTask = (AnythingTask)task;
+ anythingTask.setProcessEngineContainer(this);
+ anythingTask.setSharedStateRegistry(sharedStateRegistry);
+ return task;
+ }
+ else
+ {
+ return task;
+ }
+ }
+ }
+ }
+ return null; //task handled
+ }
+
+ /**
+ * Set the timeout setting for the test
+ *
+ * @param in number of seconds
+ */
+ public void setTestTimeoutSeconds(Integer in)
+ {
+ testTimeoutSeconds = in;
+ }
+
+ /**
+ * Get the test timeout setting
+ *
+ * @return Integer timeout number of seconds
+ */
+ public Integer getTestTimeoutSeconds()
+ {
+ return testTimeoutSeconds;
+ }
+
+ public InternalParameters getParameters()
+ {
+ InternalParameters params = new BasicInternalParameters();
+ for (Iterator iter = paramTasks.iterator(); iter.hasNext();)
+ {
+ ParamTask pTask = (ParamTask)iter.next();
+ params.setParam(pTask.getName(), pTask.getValue());
+ }
+ return params;
+ }
+
+ public Collection getUsedProps()
+ {
+ Collection props = new ArrayList();
+ for (Iterator iter = propRefs.iterator(); iter.hasNext();)
+ {
+ PropertyReferencer pr = (PropertyReferencer)iter.next();
+ props.addAll(pr.getUsedProps());
+ }
+ return props;
+ }
+
+ public void setTestUnit(String in)
+ {
+ testunit = in;
+ }
+
+ public String getTestUnit()
+ {
+ return testunit;
+ }
+
+ public TestMetadataTask getMetadataTask()
+ {
+ return metadataTask;
+ }
+
+ public final Collection getProcessTasks()
+ {
+ //org.apache.beehive.test.tools.tch.util.DebugLogger.log("TestMultiLevelHelper.getProcessTasks: processTasks are: "+processTasks);
+ return processTasks;
+ }
+
+ public Collection getAllProcessTasks()
+ {
+ return getProcessTasks();
+ }
+
+ public String getDefaultProcessName()
+ {
+ if (defaultProcessTask == null)
+ {
+ return null;
+ }
+ else
+ {
+ return (String)defaultProcessTask.getNames().iterator().next();
+ }
+ }
+
+ /**
+ * To be called only if nothing declared default process
+ * @param parent could be null (needed for zero case)
+ */
+
+ public String getSingleProcessName()
+ {
+ if (numProcessTasks() == 1)
+ {
+ return (String) ((ProcessTask)getProcessTasks().iterator().next())
+ .getNames()
+ .iterator()
+ .next();
+ }
+ return null;
+ }
+
+ public int numProcessTasks()
+ {
+ return getProcessTasks().size();
+ }
+
+ public void setDefaultProcessTask()
+ throws ProcessManagementConfigurationException
+ {
+ if (defaultProcessTask == null)
+ {
+ for (Iterator iter = processTasks.iterator(); iter.hasNext();)
+ {
+ ProcessTask processTask = (ProcessTask)iter.next();
+ if (processTask.isDefault())
+ {
+ if (defaultProcessTask != null)
+ {
+ //VALIDATION ERROR
+ Map params = new HashMap(2);
+ params.put(
+ ErrorMessageConstants.PROCESS,
+ defaultProcessTask.getNames());
+ params.put(
+ ErrorMessageConstants.OTHERPROCESS,
+ processTask.getNames());
+ invalidate(
+ new NonfatalValidationException(
+ ErrorMessageConstants.MULTIPLE_DEFAULT_PROCESS_ERROR_CODE,
+ params));
+ }
+ else
+ {
+ defaultProcessTask = processTask;
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * This must be called only after all the
+ * process tasks have been initialized
+ */
+
+ public void setProcessEngine(ProcessProvider pp)
+ {
+ try
+ {
+ processEngine = new ProcessEngine(pp.getName(), pp, getProcessRegistry());
+ }
+ catch (NonfatalValidationException ex)
+ {
+ invalidate(ex);
+ }
+ }
+
+ public ProcessEngine getProcessEngine()
+ {
+ if (processEngine == null)
+ {
+ throw new BuildException(
+ "ProcessEngine is null. getProcessEngine() is being called too early, "
+ + "must happen after setProcessEngine()");
+ }
+ return processEngine;
+ }
+
+ public ProcessRegistry getProcessRegistry()
+ {
+ return processRegistry;
+ }
+
+ /**
+ * Log a
+ * @param name
+ * @param message
+ */
+ public static void logInvalidationBatch(String name, String message)
+ {
+ TestResultBean result =
+ new TestResultAdapter(TchConstants.INVALIDATION_BATCH_LEVEL_INT);
+ result.setName(name);
+ result.setOutputMsg(message);
+ logResult(result);
+ }
+
+ public static void logResult(TestResult tr)
+ {
+ LoggerSingleton.getLogger().log(tr);
+ }
+
+ public InvalidationManager getInvalidationManager()
+ {
+ InvalidationManager newMan = new InvalidationManager();
+ newMan.addInvalidation(invalidationManager);
+
+ for (Iterator iter = tasksToValidate.iterator(); iter.hasNext();)
+ {
+ Object o = iter.next();
+ if (o instanceof BaseTask)
+ {
+ newMan.addInvalidation(((BaseTask)o).getNonfatalValidationAggregate());
+ }
+ }
+ return newMan;
+ }
+
+ protected void invalidate(NonfatalValidationException ex)
+ {
+ invalidationManager.addInvalidation(ex);
+ }
+
+ /**
+ * A simple flat, lazy Registry for holding a Map instance per name
+ * Local, not global
+ */
+
+ public static class SharedStateRegistry
+ {
+ private Map registry = new HashMap();
+
+ public Map getSharedState(String name)
+ {
+ Map sharedState = null;
+ if (registry.containsKey(name))
+ {
+ sharedState = (Map)registry.get(name);
+ }
+ else
+ {
+ sharedState = new HashMap();
+ registry.put(name, sharedState);
+ }
+ return sharedState;
+ }
+ }
+
+}
Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestMultiLevelHelper.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestNameModifierTask.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestNameModifierTask.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestNameModifierTask.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestNameModifierTask.java Fri Aug 12 08:12:28 2005
@@ -1,6 +1,6 @@
-package org.apache.beehive.test.tools.tch.core;
-
-public class TestNameModifierTask extends AbstractTestEntityModifierTask
-{
-
-}
+package org.apache.beehive.test.tools.tch.core;
+
+public class TestNameModifierTask extends AbstractTestEntityModifierTask
+{
+
+}
Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestNameModifierTask.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParallelTask.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParallelTask.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParallelTask.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParallelTask.java Fri Aug 12 08:12:28 2005
@@ -1,240 +1,240 @@
-package org.apache.beehive.test.tools.tch.core;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Location;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.TaskContainer;
-import org.apache.tools.ant.UnknownElement;
-
-import org.apache.beehive.test.tools.tch.util.ChildThread;
-import org.apache.beehive.test.tools.tch.util.NestedBulkException;
-
-/**
- * This class steals from Ant's parallel task,
- * in order to provide more control over the
- * child threads created. The child threads all
- * have a reference to the parent thread, such
- * that we can access the PerThreadCache
- */
-
-public class TestParallelTask
- extends Task
- implements TaskContainer, TwoPassTask, ChildTask, TestSuiteChild
-{
- private List nestedTasks = null;
- private Task parentTask = null;
- private TestSuiteTask testSuiteTask = null;
-
- // just used for supporting Ant 1.6. We need to keep track of all subtasks
- // so we can recurse over them later
- private Collection allTasks = new ArrayList();
-
- public Collection getAllTasks()
- {
- return allTasks;
- }
-
- public Task getParentTask()
- {
- return parentTask;
- }
-
- public TestParallelTask()
- {
- nestedTasks = new ArrayList();
- }
-
- public final void addTask(Task task)
- {
- boolean in_is_unknown = false;
- /*
- * Similar behavior to BaseTaskContainer's addTask. We need special handling
- * for Ant 1.6. Just keep call maybeConfigure() and store all subtasks. We end
- * up recursing through the tasks starting from the test-suite. The recursion
- * code is in BaseTaskContainer.
- */
- if (task instanceof UnknownElement)
- {
- in_is_unknown = true;
- ((UnknownElement)task).maybeConfigure();
- task = ((UnknownElement)task).getTask();
- allTasks.add(task);
- nestedTasks.add(task);
- }
-
- if (!in_is_unknown)
- {
- nestedTasks.add(task);
- if (parentTask instanceof BaseTaskContainer)
- ((BaseTaskContainer)parentTask).handleTask(task);
- }
- }
-
- public Task handleTask(Task task)
- {
- if (parentTask instanceof BaseTaskContainer)
- ((BaseTaskContainer)parentTask).handleTask(task);
- return task;
- }
-
- // TestSuiteChild Impl
-
- /* (non-Javadoc)
- * @see org.apache.beehive.test.tools.tch.core.TestSuiteChild#getTestSuiteCall()
- */
- public TestSuiteCallTask getTestSuiteCall()
- {
- return testSuiteTask.getTestSuiteCall();
- }
-
- /* (non-Javadoc)
- * @see org.apache.beehive.test.tools.tch.core.TestSuiteChild#getTestSuiteTask()
- */
- public TestSuiteTask getTestSuiteTask()
- {
- return testSuiteTask;
- }
-
- /* (non-Javadoc)
- * @see org.apache.beehive.test.tools.tch.core.TestSuiteChild#setTestSuiteTask(org.apache.beehive.test.tools.tch.core.TestSuiteTask)
- */
- public void setTestSuiteTask(TestSuiteTask in)
- {
- testSuiteTask = in;
- }
-
- //ChildTask implementation.
-
- public void setParentTask(Task in)
- {
- parentTask = in;
- }
-
- public void execute() throws BuildException
- {
- TaskThread ataskthread[] = new TaskThread[nestedTasks.size()];
- int i = 0;
- for (Iterator iter = nestedTasks.iterator(); iter.hasNext();)
- {
- Task task = (Task)iter.next();
- ataskthread[i] = new TaskThread(i, task);
- i++;
- }
-
- for (int j = 0; j < ataskthread.length; j++)
- {
- // There is a race condition / possible bug when there are multiple
- // test-suite-calls in a test-parallel. It seems when two calls are launched
- // too close together, tests on the target files are not being run properly. This
- // only happens sporadically, but has definitely been seen at times in the plugin tests.
- // This is difficult to debug (might even be an Ant problem). A 1-second sleep
- // here seems to do the trick, so use this as the "dirty" fix for now.
- if (ataskthread[j].getTask() instanceof TestSuiteCallTask)
- {
- try
- {
- Thread.sleep(1000);
- }
- catch (InterruptedException ex)
- {
- }
- }
- ataskthread[j].start();
- }
-
- for (int k = 0; k < ataskthread.length; k++)
- try
- {
- ataskthread[k].join();
- }
- catch (InterruptedException interruptedexception)
- {
- }
-
- int count = 0;
- Exception ex = null;
- Location location = Location.UNKNOWN_LOCATION;
- for (int i1 = 0; i1 < ataskthread.length; i1++)
- {
- Exception ex1 = (Exception)ataskthread[i1].getException();
- if (ex1 != null)
- {
- count++;
- if (ex == null)
- ex = ex1;
- else if (ex instanceof NestedBulkException)
- ((NestedBulkException)ex).addException(ex1);
- else
- {
- ex =
- new NestedBulkException(
- ex,
- "More than one exception occurred in parallel.");
- ((NestedBulkException)ex).addException(ex1);
- }
- if ((ex1 instanceof BuildException)
- && location == Location.UNKNOWN_LOCATION)
- location = ((BuildException)ex1).getLocation();
- }
- }
-
- if (count > 0)
- if (ex instanceof BuildException)
- throw (BuildException)ex;
- else
- {
- ex.printStackTrace();
- throw new BuildException(ex.getMessage(), ex, getLocation());
- }
- else
- return;
- }
-
- class TaskThread extends Thread implements ChildThread
- {
- private Thread parentThread = null;
- private Throwable exception;
- private Task task;
- private int taskNumber;
-
- public void run()
- {
- try
- {
- task.perform();
- }
- catch (Throwable throwable)
- {
- exception = throwable;
- }
- }
-
- public Throwable getException()
- {
- return exception;
- }
-
- public Thread getParentThread()
- {
- return parentThread;
- }
-
- public Task getTask()
- {
- return task;
- }
-
- TaskThread(int i, Task task1)
- {
- task = task1;
- taskNumber = i;
- //Store the thread that constructed this thread
- parentThread = Thread.currentThread();
- }
- }
-}
+package org.apache.beehive.test.tools.tch.core;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Location;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.TaskContainer;
+import org.apache.tools.ant.UnknownElement;
+
+import org.apache.beehive.test.tools.tch.util.ChildThread;
+import org.apache.beehive.test.tools.tch.util.NestedBulkException;
+
+/**
+ * This class steals from Ant's parallel task,
+ * in order to provide more control over the
+ * child threads created. The child threads all
+ * have a reference to the parent thread, such
+ * that we can access the PerThreadCache
+ */
+
+public class TestParallelTask
+ extends Task
+ implements TaskContainer, TwoPassTask, ChildTask, TestSuiteChild
+{
+ private List nestedTasks = null;
+ private Task parentTask = null;
+ private TestSuiteTask testSuiteTask = null;
+
+ // just used for supporting Ant 1.6. We need to keep track of all subtasks
+ // so we can recurse over them later
+ private Collection allTasks = new ArrayList();
+
+ public Collection getAllTasks()
+ {
+ return allTasks;
+ }
+
+ public Task getParentTask()
+ {
+ return parentTask;
+ }
+
+ public TestParallelTask()
+ {
+ nestedTasks = new ArrayList();
+ }
+
+ public final void addTask(Task task)
+ {
+ boolean in_is_unknown = false;
+ /*
+ * Similar behavior to BaseTaskContainer's addTask. We need special handling
+ * for Ant 1.6. Just keep call maybeConfigure() and store all subtasks. We end
+ * up recursing through the tasks starting from the test-suite. The recursion
+ * code is in BaseTaskContainer.
+ */
+ if (task instanceof UnknownElement)
+ {
+ in_is_unknown = true;
+ ((UnknownElement)task).maybeConfigure();
+ task = ((UnknownElement)task).getTask();
+ allTasks.add(task);
+ nestedTasks.add(task);
+ }
+
+ if (!in_is_unknown)
+ {
+ nestedTasks.add(task);
+ if (parentTask instanceof BaseTaskContainer)
+ ((BaseTaskContainer)parentTask).handleTask(task);
+ }
+ }
+
+ public Task handleTask(Task task)
+ {
+ if (parentTask instanceof BaseTaskContainer)
+ ((BaseTaskContainer)parentTask).handleTask(task);
+ return task;
+ }
+
+ // TestSuiteChild Impl
+
+ /* (non-Javadoc)
+ * @see org.apache.beehive.test.tools.tch.core.TestSuiteChild#getTestSuiteCall()
+ */
+ public TestSuiteCallTask getTestSuiteCall()
+ {
+ return testSuiteTask.getTestSuiteCall();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.beehive.test.tools.tch.core.TestSuiteChild#getTestSuiteTask()
+ */
+ public TestSuiteTask getTestSuiteTask()
+ {
+ return testSuiteTask;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.beehive.test.tools.tch.core.TestSuiteChild#setTestSuiteTask(org.apache.beehive.test.tools.tch.core.TestSuiteTask)
+ */
+ public void setTestSuiteTask(TestSuiteTask in)
+ {
+ testSuiteTask = in;
+ }
+
+ //ChildTask implementation.
+
+ public void setParentTask(Task in)
+ {
+ parentTask = in;
+ }
+
+ public void execute() throws BuildException
+ {
+ TaskThread ataskthread[] = new TaskThread[nestedTasks.size()];
+ int i = 0;
+ for (Iterator iter = nestedTasks.iterator(); iter.hasNext();)
+ {
+ Task task = (Task)iter.next();
+ ataskthread[i] = new TaskThread(i, task);
+ i++;
+ }
+
+ for (int j = 0; j < ataskthread.length; j++)
+ {
+ // There is a race condition / possible bug when there are multiple
+ // test-suite-calls in a test-parallel. It seems when two calls are launched
+ // too close together, tests on the target files are not being run properly. This
+ // only happens sporadically, but has definitely been seen at times in the plugin tests.
+ // This is difficult to debug (might even be an Ant problem). A 1-second sleep
+ // here seems to do the trick, so use this as the "dirty" fix for now.
+ if (ataskthread[j].getTask() instanceof TestSuiteCallTask)
+ {
+ try
+ {
+ Thread.sleep(1000);
+ }
+ catch (InterruptedException ex)
+ {
+ }
+ }
+ ataskthread[j].start();
+ }
+
+ for (int k = 0; k < ataskthread.length; k++)
+ try
+ {
+ ataskthread[k].join();
+ }
+ catch (InterruptedException interruptedexception)
+ {
+ }
+
+ int count = 0;
+ Exception ex = null;
+ Location location = Location.UNKNOWN_LOCATION;
+ for (int i1 = 0; i1 < ataskthread.length; i1++)
+ {
+ Exception ex1 = (Exception)ataskthread[i1].getException();
+ if (ex1 != null)
+ {
+ count++;
+ if (ex == null)
+ ex = ex1;
+ else if (ex instanceof NestedBulkException)
+ ((NestedBulkException)ex).addException(ex1);
+ else
+ {
+ ex =
+ new NestedBulkException(
+ ex,
+ "More than one exception occurred in parallel.");
+ ((NestedBulkException)ex).addException(ex1);
+ }
+ if ((ex1 instanceof BuildException)
+ && location == Location.UNKNOWN_LOCATION)
+ location = ((BuildException)ex1).getLocation();
+ }
+ }
+
+ if (count > 0)
+ if (ex instanceof BuildException)
+ throw (BuildException)ex;
+ else
+ {
+ ex.printStackTrace();
+ throw new BuildException(ex.getMessage(), ex, getLocation());
+ }
+ else
+ return;
+ }
+
+ class TaskThread extends Thread implements ChildThread
+ {
+ private Thread parentThread = null;
+ private Throwable exception;
+ private Task task;
+ private int taskNumber;
+
+ public void run()
+ {
+ try
+ {
+ task.perform();
+ }
+ catch (Throwable throwable)
+ {
+ exception = throwable;
+ }
+ }
+
+ public Throwable getException()
+ {
+ return exception;
+ }
+
+ public Thread getParentThread()
+ {
+ return parentThread;
+ }
+
+ public Task getTask()
+ {
+ return task;
+ }
+
+ TaskThread(int i, Task task1)
+ {
+ task = task1;
+ taskNumber = i;
+ //Store the thread that constructed this thread
+ parentThread = Thread.currentThread();
+ }
+ }
+}
Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParallelTask.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParameter.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParameter.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParameter.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParameter.java Fri Aug 12 08:12:28 2005
@@ -1,28 +1,28 @@
-package org.apache.beehive.test.tools.tch.core;
-
-// simple data container
-public class TestParameter
-{
- private String value = null;
- private String valueProp = null;
-
- public void setValue(String in)
- {
- value = in;
- }
-
- public String getValue()
- {
- return value;
- }
-
- public void setValueProp(String in)
- {
- valueProp = in;
- }
-
- public String getValueProp()
- {
- return valueProp;
- }
-}
+package org.apache.beehive.test.tools.tch.core;
+
+// simple data container
+public class TestParameter
+{
+ private String value = null;
+ private String valueProp = null;
+
+ public void setValue(String in)
+ {
+ value = in;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValueProp(String in)
+ {
+ valueProp = in;
+ }
+
+ public String getValueProp()
+ {
+ return valueProp;
+ }
+}
Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParameter.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParent.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParent.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParent.java (original)
+++ beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParent.java Fri Aug 12 08:12:28 2005
@@ -1,30 +1,30 @@
-package org.apache.beehive.test.tools.tch.core;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.apache.beehive.test.tools.tch.core.configuration.ProcessManagementConfigurationException;
-import org.apache.beehive.test.tools.tch.core.test.InternalParameters;
-
-public interface TestParent
-{
- public InternalParameters getParametersAbove(InternalParameters params);
-
- // public IManyToManyMap getPropsToParamsAbove(IManyToManyMap props);
- public Collection getUsedPropsAbove(Collection props);
-
- public Collection getAllProcessTasksAbove();
-
- public List getMetadataTasks(List list);
-
- public String getLowestSingleProcessName();
-
- public String getDefaultProcessName();
-
- public void setDefaultProcessTask()
- throws ProcessManagementConfigurationException;
-
- public Integer getTestTimeoutSeconds();
-}
-
-
+package org.apache.beehive.test.tools.tch.core;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.beehive.test.tools.tch.core.configuration.ProcessManagementConfigurationException;
+import org.apache.beehive.test.tools.tch.core.test.InternalParameters;
+
+public interface TestParent
+{
+ public InternalParameters getParametersAbove(InternalParameters params);
+
+ // public IManyToManyMap getPropsToParamsAbove(IManyToManyMap props);
+ public Collection getUsedPropsAbove(Collection props);
+
+ public Collection getAllProcessTasksAbove();
+
+ public List getMetadataTasks(List list);
+
+ public String getLowestSingleProcessName();
+
+ public String getDefaultProcessName();
+
+ public void setDefaultProcessTask()
+ throws ProcessManagementConfigurationException;
+
+ public Integer getTestTimeoutSeconds();
+}
+
+
Propchange: beehive/trunk/controls/test/tools/tch/src/java/org/apache/beehive/test/tools/tch/core/TestParent.java
------------------------------------------------------------------------------
svn:eol-style = native