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/06/25 13:23:27 UTC

[GitHub] [flink] 1u0 commented on a change in pull request #8858: [hotfix][tests] Change some StreamTask tests to create a test task in the task's thread

1u0 commented on a change in pull request #8858: [hotfix][tests] Change some StreamTask tests to create a test task in the task's thread
URL: https://github.com/apache/flink/pull/8858#discussion_r297184968
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTest.java
 ##########
 @@ -1023,25 +1014,63 @@ protected AbstractStateBackend createInnerBackend(Configuration config) {
 	// ------------------------------------------------------------------------
 	// ------------------------------------------------------------------------
 
+	private enum Event {
+		TASK_IS_RUNNING,
+	}
+
 	private static class EmptyStreamTask extends StreamTask<String, AbstractStreamOperator<String>> {
 
-		public EmptyStreamTask(Environment env) {
+		private boolean isRunningFoo;
+		private final LinkedBlockingQueue<Event> eventQueue;
+		private final OperatorChain<String, AbstractStreamOperator<String>> overrideOperatorChain;
+		private volatile boolean sourceFinished;
+
+		EmptyStreamTask(Environment env, LinkedBlockingQueue<Event> eventQueue, OperatorChain<String, AbstractStreamOperator<String>> operatorChain) {
 			super(env, null);
+			this.eventQueue = eventQueue;
+			this.overrideOperatorChain = operatorChain;
 		}
 
 		@Override
-		protected void init() throws Exception {}
+		protected void init() {
+			if (overrideOperatorChain != null) {
 
 Review comment:
   This is leftover, while I was transitioning and rewriting tests from the old constructor.

----------------------------------------------------------------
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