tillrohrmann commented on a change in pull request #11963: URL: https://github.com/apache/flink/pull/11963#discussion_r420654001
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/execution/librarycache/BlobLibraryCacheManagerTest.java ########## @@ -116,21 +119,21 @@ public void testLibraryCacheManagerJobCleanup() throws IOException, InterruptedE checkFileCountForJob(1, jobId2, server); checkFileCountForJob(0, jobId2, cache); - libCache.registerJob(jobId2, keys2, Collections.<URL>emptyList()); - ClassLoader classLoader2 = libCache.getClassLoader(jobId2); + final LibraryCacheManager.ClassLoaderLease classLoaderLeaseJob2 = libCache.registerClassLoaderLease(jobId2); + final ClassLoader classLoader2 = classLoaderLeaseJob2.getOrResolveClassLoader(keys2, Collections.emptyList()); assertNotEquals(classLoader1, classLoader2); try { - libCache.registerJob(jobId2, keys1, Collections.<URL>emptyList()); + classLoaderLeaseJob2.getOrResolveClassLoader(keys1, Collections.<URL>emptyList()); fail("Should fail with an IllegalStateException"); } catch (IllegalStateException e) { // that's what we want } try { - libCache.registerJob( - jobId2, keys2, + classLoaderLeaseJob1.getOrResolveClassLoader( Review comment: No this is wrong. It should be `classLoaderLeaseJob2` here. I will correct it. ---------------------------------------------------------------- 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: us...@infra.apache.org