GJL commented on a change in pull request #7659: [FLINK-11514][client] Port
ClusterClientTest
URL: https://github.com/apache/flink/pull/7659#discussion_r254648485
##########
File path:
flink-clients/src/test/java/org/apache/flink/client/program/rest/RestClusterClientTest.java
##########
@@ -492,17 +507,20 @@ public void testTriggerSavepoint() throws Exception {
private class TestSavepointTriggerHandler extends
TestHandler<SavepointTriggerRequestBody, TriggerResponse,
SavepointTriggerMessageParameters> {
+ private final boolean expectedJobCancellationFlag;
private final Iterator<String>
expectedTargetDirectories;
- TestSavepointTriggerHandler(final String...
expectedTargetDirectories) {
+ TestSavepointTriggerHandler(boolean
expectedJobCancellationFlag, final String... expectedTargetDirectories) {
super(SavepointTriggerHeaders.getInstance());
+ this.expectedJobCancellationFlag =
expectedJobCancellationFlag;
this.expectedTargetDirectories =
Arrays.asList(expectedTargetDirectories).iterator();
}
@Override
protected CompletableFuture<TriggerResponse>
handleRequest(
@Nonnull
HandlerRequest<SavepointTriggerRequestBody, SavepointTriggerMessageParameters>
request,
@Nonnull DispatcherGateway gateway)
throws RestHandlerException {
+
Assert.assertEquals(expectedJobCancellationFlag,
request.getRequestBody().isCancelJob());
Review comment:
A static import of `assertEquals` is already in this file. It would be only
consistent to use that.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services