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 2022/04/08 07:49:27 UTC

[GitHub] [flink] zentol opened a new pull request, #19404: [FLINK-26995][build] Enable fork-reuse for all unit tests

zentol opened a new pull request, #19404:
URL: https://github.com/apache/flink/pull/19404

   With this PR we reuse JVMs for all unit tests, Previously this was not the case for flink-runtime, flink-streaming-java and flink-tests.
   
   Do that end:
   - some tests were fixed to work with fork-reuse enabled
   - some unit tests are now IT cases as they inherently cannot work with fork-reuse being enabled
   - a few IT cases were marked as unit tests
   
   This provides a significant boost to the test execution times, saving ~20 minutes in flink-runtime and ~5m in flink-streaming java.


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] pnowojski commented on a diff in pull request #19404: [FLINK-26995][build] Enable fork-reuse for all unit tests

Posted by GitBox <gi...@apache.org>.
pnowojski commented on code in PR #19404:
URL: https://github.com/apache/flink/pull/19404#discussion_r845871866


##########
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskITCase.java:
##########
@@ -228,7 +228,7 @@
 import static org.mockito.Mockito.when;
 
 /** Tests for {@link StreamTask}. */
-public class StreamTaskTest extends TestLogger {
+public class StreamTaskITCase extends TestLogger {

Review Comment:
   Which tests are causing trouble? I would guess only one or two? If so, can we maybe extract those offending tests to an `ITCase` file? There is a huge family of various `StreamTask` test files. Having (most of) them in the files named according to the same convention would help avoid future confusions.



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol commented on a diff in pull request #19404: [FLINK-26995][build] Enable fork-reuse for all unit tests

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19404:
URL: https://github.com/apache/flink/pull/19404#discussion_r845879742


##########
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskITCase.java:
##########
@@ -228,7 +228,7 @@
 import static org.mockito.Mockito.when;
 
 /** Tests for {@link StreamTask}. */
-public class StreamTaskTest extends TestLogger {
+public class StreamTaskITCase extends TestLogger {

Review Comment:
   It should be those that rely on `testRecordWriterClosedOnError`, so `testFailInEndOfConstructor` and the 3 `testRecordWriterClosedOnTransit*` tests.



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol merged pull request #19404: [FLINK-26995][build] Enable fork-reuse for all unit tests

Posted by GitBox <gi...@apache.org>.
zentol merged PR #19404:
URL: https://github.com/apache/flink/pull/19404


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol commented on pull request #19404: [FLINK-26995][build] Enable fork-reuse for all unit tests

Posted by GitBox <gi...@apache.org>.
zentol commented on PR #19404:
URL: https://github.com/apache/flink/pull/19404#issuecomment-1092644436

   > I have some doubts whether we should mark unit tests as "ITCase` just because they are using some static resource
   
   That's a fair point. I went over the tests and split those where it was possible.
   These tests remained full IT Cases:
   * `FileUploadHandlerTest` checks the DeleteOnExitHooks in each test
   * `StreamTaskTimerTest` checks the TRIGGER_THREAD_GROUP after each test
   
   The renaming of TaskManagerRunnerTest was reverted, but I removed the line where we null the security manager.


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #19404: [FLINK-26995][build] Enable fork-reuse for all unit tests

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #19404:
URL: https://github.com/apache/flink/pull/19404#issuecomment-1092561871

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "7e62d40437035d20e91b894acaf306e69620fac2",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7e62d40437035d20e91b894acaf306e69620fac2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7e62d40437035d20e91b894acaf306e69620fac2 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol commented on a diff in pull request #19404: [FLINK-26995][build] Enable fork-reuse for all unit tests

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #19404:
URL: https://github.com/apache/flink/pull/19404#discussion_r845887045


##########
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskITCase.java:
##########
@@ -228,7 +228,7 @@
 import static org.mockito.Mockito.when;
 
 /** Tests for {@link StreamTask}. */
-public class StreamTaskTest extends TestLogger {
+public class StreamTaskITCase extends TestLogger {

Review Comment:
   I will look into splitting the test.



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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org