-
Notifications
You must be signed in to change notification settings - Fork 13k
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-32854][flink-runtime][JUnit5 Migration] The state package of flink-runtime module #23218
Conversation
Hi @ferenc-csaky , would you mind helping review this PR in your free time? thanks~ There are too many test migration PRs are waiting for my review, and I don't have enough time to do all review. It's better for contributors to review each other first. Of course, I will review them as well. cc @Jiabao-Sun |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this! Added some comments.
flink-runtime/src/test/java/org/apache/flink/runtime/state/AsyncSnapshotCallableTest.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/test/java/org/apache/flink/runtime/state/AsyncSnapshotCallableTest.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/test/java/org/apache/flink/runtime/state/AsyncSnapshotCallableTest.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/test/java/org/apache/flink/runtime/state/AsyncSnapshotCallableTest.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/test/java/org/apache/flink/runtime/state/TaskStateManagerImplTest.java
Outdated
Show resolved
Hide resolved
...e/src/test/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStorageAccessTest.java
Outdated
Show resolved
Hide resolved
...e/src/test/java/org/apache/flink/runtime/state/filesystem/FsCheckpointStorageAccessTest.java
Show resolved
Hide resolved
flink-runtime/src/test/java/org/apache/flink/runtime/state/heap/HeapStateBackendTestBase.java
Outdated
Show resolved
Hide resolved
...e/src/test/java/org/apache/flink/runtime/state/memory/MemoryCheckpointStorageAccessTest.java
Outdated
Show resolved
Hide resolved
...ksdb/src/test/java/org/apache/flink/contrib/streaming/state/ttl/RocksDBTtlStateTestBase.java
Outdated
Show resolved
Hide resolved
Thanks @ferenc-csaky for the detailed review and helpful suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the improvements @Jiabao-Sun, added 1 more comment, other than that it LGTM!
flink-runtime/src/test/java/org/apache/flink/runtime/state/InternalPriorityQueueTestBase.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Jiabao-Sun LGTM!
Hi @1996fanrui. |
Sure, all of your PRs that migrating the test from junit4 to junit5 of However, some of them are huge, and I'm busy recently. I will review them in my free time, thanks for the understand~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Jiabao-Sun , thanks for the contribution.
I didn't review this PR in detail, and just checked some common issues, I summarize them here:
1. The public
of junit5 test method can be removed
You can search the keyword in the state package, and remove all public for them.
@Test
public
2. Replace the isEqualTo(1)
and isEqualTo(1L)
with isOne()
3. Replace .size()).isEqualTo(
with hasSize
or hasSameSizeAs
The InternalPriorityQueue
doesn't work with this suggesion, and Java list or collection can work.
4. Check whether fail
with catch
can be replaced with assertThrownXxx
Please update them in your free time, thanks~
...me/src/test/java/org/apache/flink/runtime/state/OperatorStateOutputCheckpointStreamTest.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FileStateHandleTest.java
Show resolved
Hide resolved
flink-runtime/src/test/java/org/apache/flink/runtime/state/KeyGroupsStateHandleTest.java
Show resolved
Hide resolved
a7d0451
to
7abe90b
Compare
Thanks @1996fanrui for the hard review and sorry for the oversight. |
flink-runtime/src/test/java/org/apache/flink/runtime/state/CheckpointStorageLoaderTest.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/test/java/org/apache/flink/runtime/state/SerializationProxiesTest.java
Outdated
Show resolved
Hide resolved
flink-runtime/src/test/java/org/apache/flink/runtime/state/SnapshotDirectoryTest.java
Show resolved
Hide resolved
Thanks @1996fanrui for the continuous help. |
…link-runtime module
235c221
to
cbe5f87
Compare
Test count verified: master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Jiabao-Sun for the hard work and thanks @ferenc-csaky for the hard review!
LGTM
[FLINK-32854][flink-runtime][JUnit5 Migration] The state package of flink-runtime module
What is the purpose of the change
[flink-runtime][JUnit5 Migration] The state package of flink-runtime module
Brief change log
[flink-runtime][JUnit5 Migration] The state package of flink-runtime module
Verifying this change
This change is already covered by existing tests
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: noDocumentation