You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/03/22 02:12:55 UTC
[GitHub] [flink] Clarkkkkk commented on a change in pull request #7780:
[FLINK-11593][tests] Check & port TaskManagerTest to new code base
Clarkkkkk commented on a change in pull request #7780: [FLINK-11593][tests] Check & port TaskManagerTest to new code base
URL: https://github.com/apache/flink/pull/7780#discussion_r268018734
##########
File path: flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/TestingAbstractInvokables.java
##########
@@ -82,4 +84,51 @@ public void invoke() throws Exception {
}
}
}
+
+ public static final class TestInvokableRecordCancel extends AbstractInvokable {
+
+ private static final Object lock = new Object();
+ private static CompletableFuture<Boolean> gotCanceledFuture = new CompletableFuture<>();
+
+ public TestInvokableRecordCancel(Environment environment) {
+ super(environment);
+ }
+
+ @Override
+ public void invoke() throws Exception {
+ final Object o = new Object();
+ RecordWriter<IntValue> recordWriter = new RecordWriter<>(getEnvironment().getWriter(0));
+
+ for (int i = 0; i < 1024; i++) {
+ recordWriter.emit(new IntValue(42));
+ }
+
+ synchronized (o) {
+ //noinspection InfiniteLoopStatement
+ while (true) {
+ o.wait();
Review comment:
Thanks, will do that.
----------------------------------------------------------------
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