pnowojski commented on a change in pull request #8290: [FLINK-12070] [network]
Implement new bounded blocking subpartitions
URL: https://github.com/apache/flink/pull/8290#discussion_r279653575
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SubpartitionTestBase.java
##########
@@ -36,10 +38,24 @@
/**
* Return the subpartition to be tested.
*/
- abstract ResultSubpartition createSubpartition();
+ abstract ResultSubpartition createSubpartition() throws Exception;
//
------------------------------------------------------------------------
+ @Test
+ public void createReaderAfterDispose() throws Exception {
+ final ResultSubpartition subpartition = createSubpartition();
+ subpartition.release();
+
+ try {
+ subpartition.createReadView(() -> {});
+ fail("expected an exception");
+ }
+ catch (IllegalStateException e) {
+ // expected
Review comment:
nit: it would be better to check the exception message/error code to
distinguish between the really expected `IllegalStateException` vs something
else (this is quite generic exception)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services