[GitHub] TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit
TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit URL: https://github.com/apache/flink/pull/6490#discussion_r207763974 ## File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphTestUtils.java ## @@ -144,7 +146,48 @@ public static void waitUntilExecutionState(Execution execution, ExecutionState s } if (System.nanoTime() >= deadline) { - throw new TimeoutException(); + throw new TimeoutException( + "The execution did not reach state " + state + " in time. " + + "Current status is " + execution.getState() + '.'); + } + } + + /** +* Waits until the Execution vertex has reached a certain state. +* +* This method is based on polling and might miss very fast state transitions! +*/ + public static void waitUntilExecutionVertexState(ExecutionVertex executionVertex, ExecutionState state, long maxWaitMillis) + throws TimeoutException { + Review comment: Well I modify the others all remove the empty line This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services
[GitHub] TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit
TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit URL: https://github.com/apache/flink/pull/6490#discussion_r207727020 ## File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphTestUtils.java ## @@ -144,7 +146,48 @@ public static void waitUntilExecutionState(Execution execution, ExecutionState s } if (System.nanoTime() >= deadline) { - throw new TimeoutException(); + throw new TimeoutException( + "The execution did not reach state " + state + " in time. " + + "Current status is " + execution.getState() + '.'); + } + } + + /** +* Waits until the Execution vertex has reached a certain state. +* +* This method is based on polling and might miss very fast state transitions! +*/ + public static void waitUntilExecutionVertexState(ExecutionVertex executionVertex, ExecutionState state, long maxWaitMillis) Review comment: insist my opinion. use `waitUntilExecutionVertexStateChanged` or `waitUntilExecutionVertexStateReached` does not provide extra accuracy. maybe a better solution is `[ executionVertex waitUntilExecutionStateReach: state WithTimeOut: maxWaitMillis ]`, but we cannot. i think `waitUntilExecutionVertexState` is enough. longer name does not provide extra accuracy. This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services
[GitHub] TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit
TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit URL: https://github.com/apache/flink/pull/6490#discussion_r207727020 ## File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphTestUtils.java ## @@ -144,7 +146,48 @@ public static void waitUntilExecutionState(Execution execution, ExecutionState s } if (System.nanoTime() >= deadline) { - throw new TimeoutException(); + throw new TimeoutException( + "The execution did not reach state " + state + " in time. " + + "Current status is " + execution.getState() + '.'); + } + } + + /** +* Waits until the Execution vertex has reached a certain state. +* +* This method is based on polling and might miss very fast state transitions! +*/ + public static void waitUntilExecutionVertexState(ExecutionVertex executionVertex, ExecutionState state, long maxWaitMillis) Review comment: insist my opinion. use `waitUntilExecutionVertexStateChanged` or `waitUntilExecutionVertexStateReached` does not provide extra accuracy. maybe a better solution is `[ executionVertex waitUntilStateReach: state WithTimeOut: maxWaitMillis ]`, but we cannot. i think `waitUntilExecutionVertexState` is enough. longer name does not provide extra accuracy. This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services
[GitHub] TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit
TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit URL: https://github.com/apache/flink/pull/6490#discussion_r207708631 ## File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphTestUtils.java ## @@ -144,7 +146,48 @@ public static void waitUntilExecutionState(Execution execution, ExecutionState s } if (System.nanoTime() >= deadline) { - throw new TimeoutException(); + throw new TimeoutException( + "The execution did not reach state " + state + " in time. " + + "Current status is " + execution.getState() + '.'); + } + } + + /** +* Waits until the Execution vertex has reached a certain state. +* +* This method is based on polling and might miss very fast state transitions! +*/ + public static void waitUntilExecutionVertexState(ExecutionVertex executionVertex, ExecutionState state, long maxWaitMillis) Review comment: `waitUntilExecutionVertexState` means (as its comment/doc) we wait until the ExecutionVertex has reached a certain state. otherwise we get a `TimeoutException`. It is clear to me. So for me, I would not consider to rename it. This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services
[GitHub] TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit
TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit URL: https://github.com/apache/flink/pull/6490#discussion_r207708631 ## File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphTestUtils.java ## @@ -144,7 +146,48 @@ public static void waitUntilExecutionState(Execution execution, ExecutionState s } if (System.nanoTime() >= deadline) { - throw new TimeoutException(); + throw new TimeoutException( + "The execution did not reach state " + state + " in time. " + + "Current status is " + execution.getState() + '.'); + } + } + + /** +* Waits until the Execution vertex has reached a certain state. +* +* This method is based on polling and might miss very fast state transitions! +*/ + public static void waitUntilExecutionVertexState(ExecutionVertex executionVertex, ExecutionState state, long maxWaitMillis) Review comment: `waitUntilExecutionVertexState` means we wait until the ExecutionVertex has reached a certain state. otherwise we get a `TimeoutException`. It is clear to me. So for me, I would not consider to rename it. This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services
[GitHub] TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit
TisonKun commented on a change in pull request #6490: [FLINK-10056] [test] Add JobMasterTest#testRequestNextInputSplit URL: https://github.com/apache/flink/pull/6490#discussion_r207708380 ## File path: flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphTestUtils.java ## @@ -144,7 +146,48 @@ public static void waitUntilExecutionState(Execution execution, ExecutionState s } if (System.nanoTime() >= deadline) { - throw new TimeoutException(); + throw new TimeoutException( + "The execution did not reach state " + state + " in time. " + + "Current status is " + execution.getState() + '.'); + } + } + + /** +* Waits until the Execution vertex has reached a certain state. +* +* This method is based on polling and might miss very fast state transitions! +*/ + public static void waitUntilExecutionVertexState(ExecutionVertex executionVertex, ExecutionState state, long maxWaitMillis) + throws TimeoutException { + Review comment: This keeps consistent with similar method above. This is an automated message from the Apache Git Service. To respond to the message, please log on 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 With regards, Apache Git Services