This is useful for looking for patterns in logging files that can grow quite large.
This is taken from code from
/**
* Verify that the contents of the file contains the given the set of strings
*
* @param file File to check for expectedStrings
* @param expectedStrings Strings that file should contain
* @throws RuntimeException If the string was not found
* @throws IOException If the file cannot be opened
*/
public OutputAnalyzer shouldContain(File file, String ... expectedStrings) throws IOException {
This is taken from code from
/**
* Verify that the contents of the file contains the given the set of strings
*
* @param file File to check for expectedStrings
* @param expectedStrings Strings that file should contain
* @throws RuntimeException If the string was not found
* @throws IOException If the file cannot be opened
*/
public OutputAnalyzer shouldContain(File file, String ... expectedStrings) throws IOException {
- duplicates
-
JDK-8072687 Update OutputAnalyzer to work with files
-
- Closed
-
- relates to
-
JDK-8222550 runtime/MemberName/MemberNameLeak.java times out
-
- Resolved
-