Package org.apache.accumulo.harness
Class AccumuloITBase
- java.lang.Object
-
- org.apache.accumulo.harness.AccumuloITBase
-
- Direct Known Subclasses:
AccumuloClusterHarness
,ConfigurableMacBase
,KerberosIT
,KerberosProxyIT
,KerberosRenewalIT
,KerberosReplicationIT
,SharedMiniClusterBase
public class AccumuloITBase extends Object
Methods, setup and/or infrastructure which are common to any Accumulo integration test.
-
-
Field Summary
Fields Modifier and Type Field Description org.junit.rules.TestName
testName
-
Constructor Summary
Constructors Constructor Description AccumuloITBase()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static File
createTestDir(String name)
protected int
defaultTimeoutSeconds()
time to wait per-method before declaring a timeout, in seconds.static File
getSslDir(File baseDir)
Determines an appropriate directory name for holding generated ssl files for a test.String[]
getUniqueNames(int num)
org.junit.rules.Timeout
testsShouldTimeout()
If a given IT test has a method that takes longer than a class-set default timeout, declare it failed.
-
-
-
Method Detail
-
getUniqueNames
public String[] getUniqueNames(int num)
-
getSslDir
public static File getSslDir(File baseDir)
Determines an appropriate directory name for holding generated ssl files for a test. The directory returned will have the same name as the provided directory, but with the suffix "-ssl" appended. This new directory is not created here, but is expected to be created as needed.- Parameters:
baseDir
- the original directory, which the new directory will be created next to; it should exist- Returns:
- the new directory (is not created)
-
testsShouldTimeout
public org.junit.rules.Timeout testsShouldTimeout()
If a given IT test has a method that takes longer than a class-set default timeout, declare it failed. Note that this provides a upper bound on test times, even in the presence of Test annotations with a timeout. That is, the Test annotatation can make the timing tighter but will not be able to allow a timeout that takes longer. Defaults to no timeout and can be changed via two mechanisms 1) A given IT class can override the defaultTimeoutSeconds method if test methods in that class should have a timeout. 2) The system property "timeout.factor" is used as a multiplier for the class provided default Note that if either of these values is '0' tests will run with no timeout. The default class level timeout is set to 0.
-
defaultTimeoutSeconds
protected int defaultTimeoutSeconds()
time to wait per-method before declaring a timeout, in seconds.
-
-