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

    https://github.com/apache/flink/pull/5239#discussion_r165307761
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/state/OperatorStateBackendTest.java
 ---
    @@ -355,10 +355,11 @@ public void testSnapshotEmpty() throws Exception {
                CheckpointStreamFactory streamFactory =
                                abstractStateBackend.createStreamFactory(new 
JobID(), "testOperator");
     
    -           RunnableFuture<OperatorStateHandle> snapshot =
    +           RunnableFuture<SnapshotResult<OperatorStateHandle>> snapshot =
                                operatorStateBackend.snapshot(0L, 0L, 
streamFactory, CheckpointOptions.forCheckpoint());
     
    -           OperatorStateHandle stateHandle = 
FutureUtil.runIfNotDoneAndGet(snapshot);
    +           SnapshotResult<OperatorStateHandle> snapshotResult = 
FutureUtil.runIfNotDoneAndGet(snapshot);
    +           OperatorStateHandle stateHandle = snapshotResult != null ? 
snapshotResult.getJobManagerOwnedSnapshot() : null;
    --- End diff --
    
    This seems a bit circumstantial. Can't we make it that `snapshotResult` is 
always not null?


---

Reply via email to