Package org.apache.flink.test.resources
Class ResourceTestUtils
java.lang.Object
org.apache.flink.test.resources.ResourceTestUtils
Test utils around module resources.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PathgetResource(String resourceNameRegex) Searches for a resource file matching the given regex in the given directory.
-
Constructor Details
-
ResourceTestUtils
public ResourceTestUtils()
-
-
Method Details
-
getResource
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 staticPathfields for resource file(i.e. jar, config file) that reside in the modulestargetdirectory.- 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
-