From db8e046352b96ead63523cfe4dc7e22c6acdfec8 Mon Sep 17 00:00:00 2001 From: OrDTesters Date: Sun, 11 Nov 2018 20:25:21 -0600 Subject: [PATCH] YARN-9009 Fix flaky test TestEntityGroupFSTimelineStore.testCleanLogs --- .../server/timeline/TestEntityGroupFSTimelineStore.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestEntityGroupFSTimelineStore.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestEntityGroupFSTimelineStore.java index 04587229b0f..61da3c89308 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestEntityGroupFSTimelineStore.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/test/java/org/apache/hadoop/yarn/server/timeline/TestEntityGroupFSTimelineStore.java @@ -70,7 +70,7 @@ public class TestEntityGroupFSTimelineStore extends TimelineStoreTestUtils { private static final String SAMPLE_APP_PREFIX_CACHE_TEST = "1234_000"; private static final int CACHE_TEST_CACHE_SIZE = 5; - + private static final String TEST_SUMMARY_LOG_FILE_NAME = EntityGroupFSTimelineStore.SUMMARY_LOG_PREFIX + "test"; private static final String TEST_DOMAIN_LOG_FILE_NAME @@ -234,6 +234,8 @@ public class TestEntityGroupFSTimelineStore extends TimelineStoreTestUtils { Path pathAfter = appLogs.getAppDirPath(); assertNotEquals(pathBefore, pathAfter); assertTrue(pathAfter.toString().contains(testDoneDirPath.toString())); + + fs.delete(pathAfter, true); } @Test @@ -483,7 +485,7 @@ public class TestEntityGroupFSTimelineStore extends TimelineStoreTestUtils { AppState appstate) { // stop before creating new store to get the lock store.stop(); - + EntityGroupFSTimelineStore newStore = new EntityGroupFSTimelineStore() { @Override protected AppState getAppState(ApplicationId appId) throws IOException {