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-33853][runtime][JUnit5 Migration] Migrate Junit5 for DeclarativeSlotPoolBridge test classes of runtime module #23932

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

RocMarshal
Copy link
Contributor

What is the purpose of the change

[FLINK-33853][runtime][JUnit5 Migration] Migrate Junit5 for DeclarativeSlotPoolBridge test classes of runtime module

Brief change log

  • DeclarativeSlotPoolBridgeRequestCompletionTest
  • DeclarativeSlotPoolBridgeResourceDeclarationTest
  • DeclarativeSlotPoolBridgePreferredAllocationsTest
  • DeclarativeSlotPoolBridgeTest

Verifying this change

N.A

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

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

Documentation

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

…veSlotPoolBridge test classes of runtime module
@flinkbot
Copy link
Collaborator

flinkbot commented Dec 15, 2023

CI report:

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

@RocMarshal
Copy link
Contributor Author

Hi, @1996fanrui Could you help review this pr if you're in the free time?
Thank you~

Copy link
Member

@1996fanrui 1996fanrui left a comment

Choose a reason for hiding this comment

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

Thanks @RocMarshal for the contribution!

I left some minor comments, please take a look in your free time, thanks~

@@ -45,10 +45,10 @@
import static org.assertj.core.api.Assertions.assertThat;

@ExtendWith(TestLoggerExtension.class)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@ExtendWith(TestLoggerExtension.class)

TestLoggerExtension has been added in the module level.


/** Tests how the {@link DeclarativeSlotPoolBridge} completes slot requests. */
public class DeclarativeSlotPoolBridgeRequestCompletionTest extends TestLogger {
@ExtendWith(TestLoggerExtension.class)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@ExtendWith(TestLoggerExtension.class)


/** Tests for the {@link DeclarativeSlotPoolBridge}. */
@RunWith(Parameterized.class)
public class DeclarativeSlotPoolBridgeResourceDeclarationTest extends TestLogger {
@ExtendWith({TestLoggerExtension.class, ParameterizedTestExtension.class})
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@ExtendWith({TestLoggerExtension.class, ParameterizedTestExtension.class})
@ExtendWith(ParameterizedTestExtension.class)

FlinkMatchers.futureWillCompleteExceptionally(Duration.ofMinutes(1)));

assertThatFuture(allocationFuture).failsWithin(Duration.ofMinutes(1));
Thread.sleep(5L);
Copy link
Member

Choose a reason for hiding this comment

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

Why is it needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch!
sorry for it. Maybe it's a dirty line from the cp.
I'll remove it and check it on the other corresponding PRs.


/** Tests for the {@link DeclarativeSlotPoolBridge}. */
@RunWith(Parameterized.class)
public class DeclarativeSlotPoolBridgeTest extends TestLogger {
@ExtendWith({TestLoggerExtension.class, ParameterizedTestExtension.class})
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
@ExtendWith({TestLoggerExtension.class, ParameterizedTestExtension.class})
@ExtendWith(ParameterizedTestExtension.class)

Copy link
Member

@1996fanrui 1996fanrui left a comment

Choose a reason for hiding this comment

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

Thanks @RocMarshal for the update!

LGTM assuming CI is green.

@1996fanrui 1996fanrui merged commit 1136ed5 into apache:master Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants