Copilot commented on code in PR #30180:
URL: https://github.com/apache/flink/pull/30180#discussion_r4721904327
##########
flink-runtime/src/test/java/org/apache/flink/runtime/jobmanager/SlotCountExceedingParallelismTest.java:
##########
@@ -50,19 +49,19 @@
* Tests that Flink can execute jobs with a higher parallelism than available
number of slots. This
* effectively tests that Flink can execute jobs with blocking results in a
staged fashion.
*/
-public class SlotCountExceedingParallelismTest extends TestLogger {
+class SlotCountExceedingParallelismTest {
// Test configuration
private static final int NUMBER_OF_TMS = 2;
private static final int NUMBER_OF_SLOTS_PER_TM = 2;
private static final int PARALLELISM = NUMBER_OF_TMS *
NUMBER_OF_SLOTS_PER_TM;
- public static final String JOB_NAME =
+ private static final String JOB_NAME =
"SlotCountExceedingParallelismTest (no slot sharing, blocking
results)";
- @ClassRule
- public static final MiniClusterResource MINI_CLUSTER_RESOURCE =
- new MiniClusterResource(
+ @RegisterExtension
+ private static final InternalMiniClusterExtension MINI_CLUSTER_EXTENSION =
Review Comment:
Registering `InternalMiniClusterExtension` directly invokes both its
`beforeAll` and `beforeEach` callbacks. Each starts a cluster, so the first
test overwrites the class-scoped cluster reference; teardown only closes the
replacement, leaving the original cluster and its TaskManagers running.
Register an `AllCallbackWrapper` around the extension to preserve the previous
class-scoped lifetime and avoid leaking cluster resources.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]