public class TestBaseUtils
extends org.apache.flink.util.TestLogger
| Modifier and Type | Class and Description |
|---|---|
static class |
TestBaseUtils.TupleComparator<T extends org.apache.flink.api.java.tuple.Tuple>
Comparator for comparable Tuples.
|
| Modifier and Type | Field and Description |
|---|---|
static org.apache.flink.api.common.time.Time |
DEFAULT_HTTP_TIMEOUT |
protected static File |
logDir |
protected static int |
MINIMUM_HEAP_SIZE_MB |
| Modifier | Constructor and Description |
|---|---|
protected |
TestBaseUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static File |
asFile(String path) |
static void |
checkLinesAgainstRegexp(String resultPath,
String regexp) |
static void |
compareKeyValuePairsWithDelta(String expectedLines,
String resultPath,
String[] excludePrefixes,
String delimiter,
double maxDelta) |
static void |
compareKeyValuePairsWithDelta(String expectedLines,
String resultPath,
String delimiter,
double maxDelta) |
static <T> void |
compareOrderedResultAsText(List<T> result,
String expected) |
static <T> void |
compareResultAsText(List<T> result,
String expected) |
static <T> void |
compareResultAsTuples(List<T> result,
String expected) |
static <X> void |
compareResultCollections(List<X> expected,
List<X> actual,
Comparator<X> comparator) |
static void |
compareResultsByLinesInMemory(String expectedResultStr,
String resultPath) |
static void |
compareResultsByLinesInMemory(String expectedResultStr,
String resultPath,
String[] excludePrefixes) |
static void |
compareResultsByLinesInMemoryWithStrictOrder(String expectedResultStr,
String resultPath) |
static void |
compareResultsByLinesInMemoryWithStrictOrder(String expectedResultStr,
String resultPath,
String[] excludePrefixes) |
static String |
constructTestPath(Class<?> forClass,
String folder) |
static <T> void |
containsResultAsText(List<T> result,
String expected)
The expected string contains all expected results separate with line break, check whether all
elements in result are contained in the expected string.
|
protected static void |
deleteRecursively(File f) |
static String |
getFromHTTP(String url) |
static String |
getFromHTTP(String url,
org.apache.flink.api.common.time.Time timeout) |
static BufferedReader[] |
getResultReader(String resultPath) |
static BufferedReader[] |
getResultReader(String resultPath,
String[] excludePrefixes,
boolean inOrderOfFiles) |
static void |
readAllResultLines(List<String> target,
String resultPath) |
static void |
readAllResultLines(List<String> target,
String resultPath,
String[] excludePrefixes) |
static void |
readAllResultLines(List<String> target,
String resultPath,
String[] excludePrefixes,
boolean inOrderOfFiles) |
static void |
setEnv(Map<String,String> newenv) |
protected static final int MINIMUM_HEAP_SIZE_MB
public static final org.apache.flink.api.common.time.Time DEFAULT_HTTP_TIMEOUT
protected static File logDir
public static BufferedReader[] getResultReader(String resultPath) throws IOException
IOExceptionpublic static BufferedReader[] getResultReader(String resultPath, String[] excludePrefixes, boolean inOrderOfFiles) throws IOException
IOExceptionpublic static void readAllResultLines(List<String> target, String resultPath) throws IOException
IOExceptionpublic static void readAllResultLines(List<String> target, String resultPath, String[] excludePrefixes) throws IOException
IOExceptionpublic static void readAllResultLines(List<String> target, String resultPath, String[] excludePrefixes, boolean inOrderOfFiles) throws IOException
IOExceptionpublic static void compareResultsByLinesInMemory(String expectedResultStr, String resultPath) throws Exception
Exceptionpublic static void compareResultsByLinesInMemory(String expectedResultStr, String resultPath, String[] excludePrefixes) throws Exception
Exceptionpublic static void compareResultsByLinesInMemoryWithStrictOrder(String expectedResultStr, String resultPath) throws Exception
Exceptionpublic static void compareResultsByLinesInMemoryWithStrictOrder(String expectedResultStr, String resultPath, String[] excludePrefixes) throws Exception
Exceptionpublic static void checkLinesAgainstRegexp(String resultPath, String regexp)
public static void compareKeyValuePairsWithDelta(String expectedLines, String resultPath, String delimiter, double maxDelta) throws Exception
Exceptionpublic static void compareKeyValuePairsWithDelta(String expectedLines, String resultPath, String[] excludePrefixes, String delimiter, double maxDelta) throws Exception
Exceptionpublic static <X> void compareResultCollections(List<X> expected, List<X> actual, Comparator<X> comparator)
public static <T> void compareOrderedResultAsText(List<T> result, String expected)
public static <T> void containsResultAsText(List<T> result, String expected)
T - The result type.result - The test result.expected - The expected string value combination.protected static void deleteRecursively(File f) throws IOException
IOExceptionCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.