public class ScaffoldingForRollingTests extends Object
Modifier and Type | Field and Description |
---|---|
protected Context |
context |
protected long |
currentTime |
static String |
DATE_PATTERN_BY_DAY |
static String |
DATE_PATTERN_WITH_SECONDS |
protected EchoEncoder<Object> |
encoder |
protected List<String> |
expectedFilenameList |
protected List<Future<?>> |
futureList |
protected long |
nextRolloverThreshold |
protected String |
randomOutputDir |
static SimpleDateFormat |
SDF |
Constructor and Description |
---|
ScaffoldingForRollingTests() |
Modifier and Type | Method and Description |
---|---|
protected void |
add(Future<?> future) |
protected void |
addExpectedFileName_ByDate(String patternStr,
long millis) |
protected void |
addExpectedFileName_ByDate(String outputDir,
String testId,
Date date,
boolean gzExtension) |
protected void |
addExpectedFileName_ByFileIndexCounter(String randomOutputDir,
String testId,
long millis,
int fileIndexCounter,
String compressionSuffix) |
protected void |
addExpectedFileNamedIfItsTime_ByDate(String fileNamePatternStr) |
protected void |
addExpectedFileNamedIfItsTime_ByDate(String outputDir,
String testId,
boolean gzExtension) |
protected void |
checkZipEntryMatchesZipFilename(List<String> expectedFilenameList) |
static void |
existenceCheck(List<String> filenameList) |
static void |
existenceCheck(String filename) |
static int |
existenceCount(List<String> filenameList) |
static void |
fileContentCheck(File[] fileArray,
int runLength,
String prefix) |
static void |
fileContentCheck(File[] fileArray,
int runLength,
String prefix,
int runStart) |
protected List<String> |
filterElementsInListBySuffix(String suffix) |
protected Date |
getDateOfCurrentPeriodsStart() |
protected Date |
getDateOfPreviousPeriodsStart() |
static File[] |
getFilesInDirectory(String outputDirStr) |
protected long |
getMillisOfCurrentPeriodsStart() |
protected void |
incCurrentTime(long increment) |
protected void |
massageExpectedFilesToCorresponToCurrentTarget(String fileName,
boolean fileOptionIsSet) |
protected boolean |
passThresholdTime(long nextRolloverThreshold) |
protected void |
recomputeRolloverThreshold(long ct) |
static void |
reverseSortedContentCheck(String outputDirStr,
int runLength,
String prefix) |
void |
setUp() |
static void |
sortedContentCheck(String outputDirStr,
int runLength,
String prefix) |
static void |
sortedContentCheck(String outputDirStr,
int runLength,
String prefix,
int runStart) |
protected String |
testId2FileName(String testId) |
protected void |
waitForJobsToComplete() |
protected void |
zipEntryNameCheck(List<String> expectedFilenameList,
String pattern) |
public static final String DATE_PATTERN_WITH_SECONDS
public static final String DATE_PATTERN_BY_DAY
public static final SimpleDateFormat SDF
protected String randomOutputDir
protected EchoEncoder<Object> encoder
protected List<String> expectedFilenameList
protected long nextRolloverThreshold
protected long currentTime
protected List<Future<?>> futureList
public ScaffoldingForRollingTests()
public void setUp()
public static void existenceCheck(String filename)
public static File[] getFilesInDirectory(String outputDirStr)
public static void fileContentCheck(File[] fileArray, int runLength, String prefix) throws IOException
IOException
public static void fileContentCheck(File[] fileArray, int runLength, String prefix, int runStart) throws IOException
IOException
public static void sortedContentCheck(String outputDirStr, int runLength, String prefix) throws IOException
IOException
public static void sortedContentCheck(String outputDirStr, int runLength, String prefix, int runStart) throws IOException
IOException
public static void reverseSortedContentCheck(String outputDirStr, int runLength, String prefix) throws IOException
IOException
public static void existenceCheck(List<String> filenameList)
public static int existenceCount(List<String> filenameList)
protected String testId2FileName(String testId)
protected void recomputeRolloverThreshold(long ct)
protected boolean passThresholdTime(long nextRolloverThreshold)
protected void incCurrentTime(long increment)
protected Date getDateOfCurrentPeriodsStart()
protected Date getDateOfPreviousPeriodsStart()
protected long getMillisOfCurrentPeriodsStart()
protected void addExpectedFileName_ByDate(String patternStr, long millis)
protected void addExpectedFileNamedIfItsTime_ByDate(String fileNamePatternStr)
protected void addExpectedFileName_ByDate(String outputDir, String testId, Date date, boolean gzExtension)
protected void addExpectedFileName_ByFileIndexCounter(String randomOutputDir, String testId, long millis, int fileIndexCounter, String compressionSuffix)
protected List<String> filterElementsInListBySuffix(String suffix)
protected void addExpectedFileNamedIfItsTime_ByDate(String outputDir, String testId, boolean gzExtension)
protected void massageExpectedFilesToCorresponToCurrentTarget(String fileName, boolean fileOptionIsSet)
protected void zipEntryNameCheck(List<String> expectedFilenameList, String pattern) throws IOException
IOException
protected void checkZipEntryMatchesZipFilename(List<String> expectedFilenameList) throws IOException
IOException
protected void waitForJobsToComplete()
Copyright © 2005–2018 QOS.ch. All rights reserved.