You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zentol <gi...@git.apache.org> on 2018/03/20 12:13:11 UTC

[GitHub] flink pull request #5728: [FLINK-8965][tests] Port TimestampITCase to flip6

GitHub user zentol opened a pull request:

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

    [FLINK-8965][tests] Port TimestampITCase to flip6

    ## What is the purpose of the change
    
    Ports the `TimestampITCase` to use `MiniClusterResource`.
    
    ## Verifying this change
    
    Run `TimestampITCase` with `flip6` profile enabled/disabled.


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

    $ git pull https://github.com/zentol/flink 8965

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

    https://github.com/apache/flink/pull/5728.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 #5728
    
----

----


---

[GitHub] flink pull request #5728: [FLINK-8965][tests] Port TimestampITCase to flip6

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5728#discussion_r176678985
  
    --- Diff: flink-tests/src/test/java/org/apache/flink/test/streaming/runtime/TimestampITCase.java ---
    @@ -185,22 +177,23 @@ public void testWatermarkPropagationNoFinalWatermarkOnStop() throws Exception {
     				.transform("Custom Operator", BasicTypeInfo.INT_TYPE_INFO, new CustomOperator(true))
     				.addSink(new DiscardingSink<Integer>());
     
    -		new Thread("stopper") {
    +		Thread t = new Thread("stopper") {
     			@Override
     			public void run() {
     				try {
     					// try until we get the running jobs
    -					List<JobID> running;
    -					while ((running = cluster.getCurrentlyRunningJobsJava()).isEmpty()) {
    +					List<JobID> running = getRunningJobs(clusterClient);
    +					while (running.isEmpty()) {
     						Thread.sleep(10);
    +						running = getRunningJobs(clusterClient);
     					}
     
    -					JobID id = running.get(0);
    +					JobID id = running.iterator().next();
    --- End diff --
    
    could also be `running.get(0)`, then we don't create an additional iterator object


---

[GitHub] flink pull request #5728: [FLINK-8965][tests] Port TimestampITCase to flip6

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---

[GitHub] flink issue #5728: [FLINK-8965][tests] Port TimestampITCase to flip6

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/5728
  
    Test failure on Travis is unrelated: https://issues.apache.org/jira/browse/FLINK-8899


---

[GitHub] flink pull request #5728: [FLINK-8965][tests] Port TimestampITCase to flip6

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5728#discussion_r176731691
  
    --- Diff: flink-tests/src/test/java/org/apache/flink/test/streaming/runtime/TimestampITCase.java ---
    @@ -185,22 +177,23 @@ public void testWatermarkPropagationNoFinalWatermarkOnStop() throws Exception {
     				.transform("Custom Operator", BasicTypeInfo.INT_TYPE_INFO, new CustomOperator(true))
     				.addSink(new DiscardingSink<Integer>());
     
    -		new Thread("stopper") {
    +		Thread t = new Thread("stopper") {
     			@Override
     			public void run() {
     				try {
     					// try until we get the running jobs
    -					List<JobID> running;
    -					while ((running = cluster.getCurrentlyRunningJobsJava()).isEmpty()) {
    +					List<JobID> running = getRunningJobs(clusterClient);
    +					while (running.isEmpty()) {
     						Thread.sleep(10);
    +						running = getRunningJobs(clusterClient);
     					}
     
    -					JobID id = running.get(0);
    +					JobID id = running.iterator().next();
    --- End diff --
    
    will fix while merging.


---