zentol commented on a change in pull request #7653: [FLINK-11367][tests] Port
TaskManagerProcessReapingTestBase to new codebase
URL: https://github.com/apache/flink/pull/7653#discussion_r254227151
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunnerTest.java
##########
@@ -37,44 +43,57 @@
*/
public class TaskManagerRunnerTest extends TestLogger {
- @Test
- public void testTaskManagerRunnerShutdown() throws Exception {
- final Configuration configuration = new Configuration();
- final ResourceID taskManagerResourceId = ResourceID.generate();
-
- final ServerSocket localhost = new ServerSocket(0);
-
- configuration.setString(JobManagerOptions.ADDRESS,
localhost.getInetAddress().getHostName());
- configuration.setInteger(JobManagerOptions.PORT,
localhost.getLocalPort());
-
configuration.setString(TaskManagerOptions.REGISTRATION_TIMEOUT, "10 ms");
- final CompletableFuture<Void> jvmTerminationFuture = new
CompletableFuture<>();
- final TestingTaskManagerRunner taskManagerRunner = new
TestingTaskManagerRunner(configuration, taskManagerResourceId,
jvmTerminationFuture);
+ @Rule
+ public final Timeout timeout = Timeout.seconds(30);
- taskManagerRunner.start();
+ private Configuration configuration;
Review comment:
having this as a field seems unnecessary; I'd rather have a method that
creates and returns this configuration.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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