Package org.apache.derby.impl.tools.ij
Class mtTestCase
- java.lang.Object
-
- org.apache.derby.impl.tools.ij.mtTestCase
-
public class mtTestCase extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private intattemptsjava.lang.Stringdescriptionjava.lang.Stringfilejava.util.HashtableignoreErrorsprivate intiterationsjava.lang.Stringnamejava.lang.StringpropFilefloatweight
-
Constructor Summary
Constructors Constructor Description mtTestCase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringalterURL(java.lang.String url, java.lang.String newURLPrefix)java.lang.StringgetFile()java.lang.StringgetName()java.lang.StringgetPropFile()booleangrab()Attempt to grab this test case.java.io.BufferedInputStreaminitialize()Initialize the test case.java.io.BufferedInputStreaminitialize(java.lang.String inputDir)Initizalize the test case.voidmtTestCase()voidrunMe(LocalizedOutput log, LocalizedOutput out, java.io.BufferedInputStream infile)Run the test case.voidsetDescription(java.lang.String description)voidsetFile(java.lang.String name)voidsetIgnoreErrors(java.util.Hashtable t)voidsetInputDir(java.lang.String dir)voidsetName(java.lang.String name)voidsetPropFile(java.lang.String name)voidsetWeight(int weight)java.lang.StringtoString()Name says it allvoidupdateURLProperties(java.util.Properties p, java.lang.String newURLPrefix)
-
-
-
Field Detail
-
name
public java.lang.String name
-
file
public java.lang.String file
-
propFile
public java.lang.String propFile
-
weight
public float weight
-
ignoreErrors
public java.util.Hashtable ignoreErrors
-
description
public java.lang.String description
-
iterations
private int iterations
-
attempts
private int attempts
-
-
Method Detail
-
mtTestCase
public void mtTestCase()
-
setName
public void setName(java.lang.String name)
-
getName
public java.lang.String getName()
-
setFile
public void setFile(java.lang.String name)
-
setInputDir
public void setInputDir(java.lang.String dir)
-
getFile
public java.lang.String getFile()
-
setPropFile
public void setPropFile(java.lang.String name)
-
getPropFile
public java.lang.String getPropFile()
-
setWeight
public void setWeight(int weight)
-
setIgnoreErrors
public void setIgnoreErrors(java.util.Hashtable t)
-
setDescription
public void setDescription(java.lang.String description)
-
initialize
public java.io.BufferedInputStream initialize() throws java.io.FileNotFoundException, java.io.IOExceptionInitialize the test case. See initialize(String)- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
initialize
public java.io.BufferedInputStream initialize(java.lang.String inputDir) throws java.io.FileNotFoundException, java.io.IOExceptionInitizalize the test case. Loads up the properties file and sets the input stream. Used to set up prior to running the thread.- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
grab
public boolean grab()
Attempt to grab this test case. Uses random number and the weight of this case to determine if the grab was successful.- Returns:
- true/false
-
runMe
public void runMe(LocalizedOutput log, LocalizedOutput out, java.io.BufferedInputStream infile)
Run the test case. Invokes IJ to do our dirty work.
-
updateURLProperties
public void updateURLProperties(java.util.Properties p, java.lang.String newURLPrefix)
-
alterURL
public java.lang.String alterURL(java.lang.String url, java.lang.String newURLPrefix)
-
toString
public java.lang.String toString()
Name says it all- Overrides:
toStringin classjava.lang.Object
-
-