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 #4485: [FLINK-7378][core]Create a fix size (non rebalanci...
Date Wed, 30 Aug 2017 10:01:58 GMT
Github user NicoK commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4485#discussion_r136020758
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/NetworkBufferPoolTest.java
---
    @@ -168,4 +171,45 @@ public void testDestroyAll() {
     			fail(e.getMessage());
     		}
     	}
    +
    +	@Test
    +	public void testRequestAndRecycleMemorySegments() throws Exception {
    +		final int numBuffers = 10;
    +
    +		NetworkBufferPool globalPool = new NetworkBufferPool(numBuffers, 128, MemoryType.HEAP);
    +
    +		List<MemorySegment> segments = null;
    +		// request buffers from global pool with illegal argument
    +		try {
    +			segments = globalPool.requestMemorySegments(0);
    +			fail("Should throw an IllegalArgumentException");
    +		} catch (IllegalArgumentException e) {
    +			assertNull(segments);
    --- End diff --
    
    `assertNull(segments);` is not needed (it will always be true)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message