flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] StephanEwen commented on a change in pull request #8290: [FLINK-12070] [network] Implement new bounded blocking subpartitions
Date Tue, 30 Apr 2019 10:05:56 GMT
StephanEwen 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_r279690122
 
 

 ##########
 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:
   I think this is targeted enough here to be fine.
   We often do not have messages in IllegalArgumentExceptions, if the `checkState` is meant
as the equivalent of an always active assert statement. This is mainly for tracing error root
causes in case of legitimate bugs, and the stack trace defines the exception even better than
any error message.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message