Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-32848][tests][JUnit5 migration] Migrate flink-runtime/registration tests to JUnit5 #23300

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

X-czh
Copy link
Contributor

@X-czh X-czh commented Aug 26, 2023

What is the purpose of the change

Migrate flink-runtime/registration tests to JUnit5.

Verifying this change

The change itself is for migrating UT.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@flinkbot
Copy link
Collaborator

flinkbot commented Aug 26, 2023

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@X-czh X-czh changed the title [FLINK-32848][tests][JUnit5 migration] Migrate flink-runtime/registration tests to JUnit5. [FLINK-32848][tests][JUnit5 migration] Migrate flink-runtime/registration tests to JUnit5 Aug 26, 2023
@X-czh
Copy link
Contributor Author

X-czh commented Sep 11, 2023

Hi @1996fanrui, could you review the change when you are free, much appreciated~

@X-czh
Copy link
Contributor Author

X-czh commented Sep 14, 2023

Hi @FangYongs, could you review the change when you are free?


/** Tests for RegisteredRpcConnection, validating the successful, failure and close behavior. */
public class RegisteredRpcConnectionTest extends TestLogger {
class RegisteredRpcConnectionTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may need to add @ExtendWith(TestLoggerExtension.class) for RegisteredRpcConnectionTest after removing extends TestLogger


/** Tests for the {@link RetryingRegistrationConfiguration}. */
public class RetryingRegistrationConfigurationTest extends TestLogger {
class RetryingRegistrationConfigurationTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, we reached agreement with Fan Rui and Matthias Pohl previously that we should not add @ExtendWith(TestLoggerExtension.class) explicitly for each class but rather enable it globally in Junit5 configs. See https://issues.apache.org/jira/browse/FLINK-32866

@@ -59,28 +54,28 @@
* Tests for the generic retrying registration class, validating the failure, retry, and back-off
* behavior.
*/
public class RetryingRegistrationTest extends TestLogger {
class RetryingRegistrationTest {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@FangYongs
Copy link
Contributor

Thanks @X-czh for contribution, just some minor comments

@FangYongs
Copy link
Contributor

Thanks @X-czh , LGTM +1

@FangYongs FangYongs merged commit 18c9d09 into apache:master Sep 15, 2023
@X-czh X-czh deleted the FLINK-32848-registration branch September 15, 2023 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants