[GitHub] flink pull request #5671: [FLINK-8906][flip6][tests] also test Flip6DefaultC...

2018-03-19 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/5671


---


[GitHub] flink pull request #5671: [FLINK-8906][flip6][tests] also test Flip6DefaultC...

2018-03-13 Thread StefanRRichter
Github user StefanRRichter commented on a diff in the pull request:

https://github.com/apache/flink/pull/5671#discussion_r174142014
  
--- Diff: 
flink-clients/src/test/java/org/apache/flink/client/cli/CliFrontendCancelTest.java
 ---
@@ -39,13 +47,27 @@
 /**
  * Tests for the CANCEL command.
  */
+@RunWith(Parameterized.class)
 public class CliFrontendCancelTest extends TestLogger {
 
+   @Parameterized.Parameters(name = "Mode = {0}")
--- End diff --

Everything about introducing this parameter is duplicated in all the test 
classes. I would create a common super class that does this parameter iteration 
and implements the `getCli()` and `getConfiguration()` methods, instead of 
having them as static methods.


---


[GitHub] flink pull request #5671: [FLINK-8906][flip6][tests] also test Flip6DefaultC...

2018-03-13 Thread StefanRRichter
Github user StefanRRichter commented on a diff in the pull request:

https://github.com/apache/flink/pull/5671#discussion_r174139638
  
--- Diff: 
flink-clients/src/main/java/org/apache/flink/client/program/rest/RestClusterClient.java
 ---
@@ -567,7 +567,7 @@ public GetClusterStatusResponse getClusterStatus() {
 
@Override
public int getMaxSlots() {
-   return 0;
+   return -1;
--- End diff --

I suggest to assign this magic number to some `static final` variable with 
a descriptive name and use it here and in `CliFrontend`, so that the connection 
is clear.


---


[GitHub] flink pull request #5671: [FLINK-8906][flip6][tests] also test Flip6DefaultC...

2018-03-09 Thread NicoK
GitHub user NicoK opened a pull request:

https://github.com/apache/flink/pull/5671

[FLINK-8906][flip6][tests] also test Flip6DefaultCLI in 
org.apache.flink.client.cli tests

## What is the purpose of the change

Various tests in `org.apache.flink.client.cli` only test with the 
`DefaultCLI` but should also test `Flip6DefaultCLI`.

Please note that this PR also includes 
[FLINK-8905](https://issues.apache.org/jira/browse/FLINK-8905) 
(RestClusterClient#getMaxSlots() returning `0` instead of `-1`) which was 
uncovered by these tests .

## Brief change log

- let `RestClusterClient#getMaxSlots()` return `-1` as expected for unknown 
slot counts
- make tests under `org.apache.flink.client.cli` parameterized with Flip-6 
and old mode to test with `DefaultCLI` and `Flip6DefaultCLI`

## Verifying this change

This change added tests for FLIP-6 based on existing tests

## Does this pull request potentially affect one of the following parts:

  - Dependencies (does it add or upgrade a dependency): **no**
  - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: **no**
  - The serializers: **no**
  - The runtime per-record code paths (performance sensitive): **no**
  - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: **no**
  - The S3 file system connector: **no**

## Documentation

  - Does this pull request introduce a new feature? **no**
  - If yes, how is the feature documented? **not applicable**


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/NicoK/flink flink-8906

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/5671.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #5671


commit 77cea62307c49cddc9b0699b36dfcb81d52a2f44
Author: Nico Kruber 
Date:   2018-03-09T09:56:31Z

[hotfix][cli][tests] let CliFrontendRunTest extend from TestLogger

commit 49a502f50abf9d351ac0adbb1a78bfbc9f06cd73
Author: Nico Kruber 
Date:   2018-03-06T10:43:32Z

[FLINK-8904][cli][tests] always restore the previous sysout when changing 
it in the test

commit 417689deed94b00228e3959ba7ccdfc71985d8ac
Author: Nico Kruber 
Date:   2018-03-09T10:05:51Z

[FLINK-8905][rest][client] fix RestClusterClient#getMaxSlots() returning 0

commit 47a92c5c34c7422f809f5e2424221c8bdb2b8cc8
Author: Nico Kruber 
Date:   2018-03-08T10:07:08Z

[FLINK-8906][flip6][tests] also test Flip6DefaultCLI in 
org.apache.flink.client.cli tests




---