Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4358#discussion_r142139615
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/blob/BlobCacheCleanupTest.java
 ---
    @@ -252,6 +280,36 @@ public void testJobDeferredCleanup() throws 
IOException, InterruptedException {
        }
     
        /**
    +    * Checks that BLOBs for the given <tt>jobId</tt> are cleaned up 
eventually (after calling
    +    * {@link PermanentBlobCache#releaseJob(JobID)}, which is not done by 
this method!) (waits at
    +    * most 30s).
    +    *
    +    * @param cache
    +    *              BLOB server
    +    * @param jobId
    +    *              job ID or <tt>null</tt> if job-unrelated
    +    * @param keys
    +    *              keys identifying BLOBs which were previously registered 
for the <tt>jobId</tt>
    +    */
    +   static void verifyJobCleanup(PermanentBlobCache cache, JobID jobId, 
List<BlobKey> keys)
    +           throws InterruptedException, IOException {
    +           // because we cannot guarantee that there are not thread races 
in the build system, we
    +           // loop for a certain while until the references disappear
    +           {
    +                   long deadline = System.currentTimeMillis() + 30_000L;
    --- End diff --
    
    Shouldn't the deadline be configurable? `verifyJobCleanup` should not know 
how long the clean up takes (I guess it depends on the cleanup interval).


---

Reply via email to