Package org.apache.flink.test.resources
Class ResourceTestUtils
- java.lang.Object
-
- org.apache.flink.test.resources.ResourceTestUtils
-
public class ResourceTestUtils extends Object
Test utils around module resources.
-
-
Constructor Summary
Constructors Constructor Description ResourceTestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Path
getResource(String resourceNameRegex)
Searches for a resource file matching the given regex in the given directory.
-
-
-
Method Detail
-
getResource
public static Path getResource(String resourceNameRegex)
Searches for a resource file matching the given regex in the given directory. This method is primarily intended to be used for the initialization of staticPath
fields for resource file(i.e. jar, config file) that reside in the modulestarget
directory.- Parameters:
resourceNameRegex
- regex pattern to match against- Returns:
- Path pointing to the matching jar
- Throws:
RuntimeException
- if none or multiple resource files could be found
-
-