flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tillrohrmann <...@git.apache.org>
Subject [GitHub] flink pull request #4358: [FLINK-7068][blob] change BlobService sub-classes ...
Date Mon, 02 Oct 2017 13:42:12 GMT
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).


---

Mime
View raw message