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

    https://github.com/apache/flink/pull/6203#discussion_r199197307
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/rest/handler/job/JobSubmitHandlerTest.java
 ---
    @@ -47,8 +65,30 @@
      */
     public class JobSubmitHandlerTest extends TestLogger {
     
    +   @ClassRule
    +   public static final TemporaryFolder TEMPORARY_FOLDER = new 
TemporaryFolder();
    +   private static BlobServer blobServer;
    +
    +   @BeforeClass
    +   public static void setup() throws IOException {
    +           Configuration config = new Configuration();
    +           config.setString(BlobServerOptions.STORAGE_DIRECTORY,
    +                   TEMPORARY_FOLDER.newFolder().getAbsolutePath());
    +
    +           blobServer = new BlobServer(config, new VoidBlobStore());
    +           blobServer.start();
    +   }
    +
    +   @AfterClass
    +   public static void teardown() throws IOException {
    +           if (blobServer != null) {
    +                   blobServer.close();
    +           }
    +   }
    +
        @Test
        public void testSerializationFailureHandling() throws Exception {
    +           final Path jobGraphFile = TEMPORARY_FOLDER.newFile().toPath();
                DispatcherGateway mockGateway = mock(DispatcherGateway.class);
                when(mockGateway.submitJob(any(JobGraph.class), 
any(Time.class))).thenReturn(CompletableFuture.completedFuture(Acknowledge.get()));
                GatewayRetriever<DispatcherGateway> mockGatewayRetriever = 
mock(GatewayRetriever.class);
    --- End diff --
    
    Here we could use instead `() -> new CompletableFuture()`


---

Reply via email to