flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From NicoK <...@git.apache.org>
Subject [GitHub] flink pull request #4581: [FLINK-7499][io] fix double buffer release in Spil...
Date Thu, 23 Nov 2017 16:56:13 GMT
Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4581#discussion_r152845922
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/ResultPartitionTest.java
---
    @@ -145,6 +165,45 @@ protected void testAddOnReleasedPartition(final ResultPartitionType
pipelined)
     		}
     	}
     
    +	@Test
    +	public void testAddOnPipelinedPartition() throws Exception {
    +		testAddOnPartition(ResultPartitionType.PIPELINED);
    +	}
    +
    +	@Test
    +	public void testAddOnBlockingPartition() throws Exception {
    +		testAddOnPartition(ResultPartitionType.BLOCKING);
    +	}
    +
    +	/**
    +	 * Tests {@link ResultPartition#add} on a working partition.
    +	 *
    +	 * @param pipelined the result partition type to set up
    +	 */
    +	protected void testAddOnPartition(final ResultPartitionType pipelined)
    +		throws Exception {
    +		ResultPartitionConsumableNotifier notifier = mock(ResultPartitionConsumableNotifier.class);
    --- End diff --
    
    do you think it's better to have a real implementation of that interface, spy on it, and
then verify the expected method calls? - this actually seems like some more overhead with
little/no gain. I'd prefer to leave it as is for now.


---

Mime
View raw message