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 #5581: [FLINK-8755][FLINK-8786][network] fix two bugs in ...
Date Tue, 27 Feb 2018 17:00:10 GMT
Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5581#discussion_r170993496
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SpillableSubpartitionTest.java
---
    @@ -222,59 +219,24 @@ public void testConsumeSpilledPartition() throws Exception {
     		assertEquals(1, listener.getNumNotifications());
     
     		assertFalse(reader.nextBufferIsEvent()); // buffer
    -		BufferAndBacklog read = reader.getNextBuffer();
    -		assertNotNull(read);
    -		assertTrue(read.buffer().isBuffer());
    +		assertNextBuffer(reader, BUFFER_DATA_SIZE, true, 2, false, true);
     		assertEquals(2, partition.getBuffersInBacklog());
    -		assertEquals(partition.getBuffersInBacklog(), read.buffersInBacklog());
    -		assertFalse(read.buffer().isRecycled());
    -		read.buffer().recycleBuffer();
    -		assertTrue(read.buffer().isRecycled());
    -		assertFalse(read.nextBufferIsEvent());
     
     		assertFalse(reader.nextBufferIsEvent()); // buffer
    -		read = reader.getNextBuffer();
    -		assertNotNull(read);
    -		assertTrue(read.buffer().isBuffer());
    +		assertNextBuffer(reader, BUFFER_DATA_SIZE, true, 1, true, true);
     		assertEquals(1, partition.getBuffersInBacklog());
    -		assertEquals(partition.getBuffersInBacklog(), read.buffersInBacklog());
    -		assertFalse(read.buffer().isRecycled());
    -		read.buffer().recycleBuffer();
    -		assertTrue(read.buffer().isRecycled());
    -		assertTrue(read.nextBufferIsEvent());
     
     		assertTrue(reader.nextBufferIsEvent()); // event
    -		read = reader.getNextBuffer();
    -		assertNotNull(read);
    -		assertFalse(read.buffer().isBuffer());
    +		assertNextEvent(reader, BUFFER_DATA_SIZE, null, true, 1, false, true);
    --- End diff --
    
    almost - it remains `@Nullable` in `SubpartitionTestBase#assertNextBufferOrEvent`


---

Mime
View raw message