You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/06/25 10:26:21 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #24966: [SPARK-28157][CORE] Make SHS clear KVStore LogInfo for the expired blacklist entries

dongjoon-hyun commented on a change in pull request #24966: [SPARK-28157][CORE] Make SHS clear KVStore LogInfo for the expired blacklist entries
URL: https://github.com/apache/spark/pull/24966#discussion_r297116337
 
 

 ##########
 File path: core/src/test/scala/org/apache/spark/deploy/history/FsHistoryProviderSuite.scala
 ##########
 @@ -1124,15 +1124,13 @@ class FsHistoryProviderSuite extends SparkFunSuite with Matchers with Logging {
       SparkListenerApplicationEnd(5L))
     val mockedFs = spy(provider.fs)
     doThrow(new AccessControlException("Cannot read accessDenied file")).when(mockedFs).open(
-      argThat((path: Path) => path.getName.toLowerCase(Locale.ROOT) == "accessdenied"))
+      argThat((path: Path) => path.getName.toLowerCase(Locale.ROOT) == "accessdenied" &&
+        clock.getTimeMillis() < 1533132471 + 24 * 60 * 60 * 1000))
     val mockedProvider = spy(provider)
     when(mockedProvider.fs).thenReturn(mockedFs)
     updateAndCheck(mockedProvider) { list =>
       list.size should be(1)
     }
-    writeFile(accessDenied, true, None,
-      SparkListenerApplicationStart("accessDenied", Some("accessDenied"), 1L, "test", None),
-      SparkListenerApplicationEnd(5L))
 
 Review comment:
   This has a wrong assumption that the file size will grow. In this PR, I removed this assumption and add time condition at line 1128.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org