[
https://issues.apache.org/jira/browse/FLINK-8562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16404430#comment-16404430
]
ASF GitHub Bot commented on FLINK-8562:
---------------------------------------
Github user suez1224 commented on a diff in the pull request:
https://github.com/apache/flink/pull/5416#discussion_r175342198
--- Diff:
flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnTestBase.java ---
@@ -379,6 +382,50 @@ public boolean accept(File dir, String name) {
}
}
+ public static void ensureStringInNamedLogFiles(final String[] mustHave,
final String fileName) {
+ File cwd = new File("target/" +
YARN_CONFIGURATION.get(TEST_CLUSTER_NAME_KEY));
+ Assert.assertTrue("Expecting directory " +
cwd.getAbsolutePath() + " to exist", cwd.exists());
+ Assert.assertTrue(
+ "Expecting directory " + cwd.getAbsolutePath()
+ " to be a directory", cwd.isDirectory());
+
+ File foundFile = findFile(cwd.getAbsolutePath(), new
FilenameFilter() {
+ @Override
+ public boolean accept(File dir, String name) {
+ if (fileName != null && !name.equals(fileName))
{
+ return false;
+ }
+ File f = new File(dir.getAbsolutePath() + "/" +
name);
+ LOG.info("Searching in {}",
f.getAbsolutePath());
+ try {
+ Set<String> foundSet = new
HashSet<String>(mustHave.length);
+ Scanner scanner = new Scanner(f);
+ while (scanner.hasNextLine()) {
+ final String lineFromFile =
scanner.nextLine();
+ for (String str : mustHave) {
+ if
(lineFromFile.contains(str)) {
+
foundSet.add(str);
+ }
+ }
+ if
(foundSet.containsAll(Arrays.asList(mustHave))) {
--- End diff --
done
> Fix YARNSessionFIFOSecuredITCase
> --------------------------------
>
> Key: FLINK-8562
> URL: https://issues.apache.org/jira/browse/FLINK-8562
> Project: Flink
> Issue Type: Bug
> Components: Security
> Affects Versions: 1.5.0, 1.6.0
> Reporter: Shuyi Chen
> Assignee: Shuyi Chen
> Priority: Blocker
> Fix For: 1.5.0
>
>
> Currently, YARNSessionFIFOSecuredITCase will not fail even if the current
> Flink YARN Kerberos integration is failing in production. Please see
> FLINK-8275.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)