You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Rui Fan (Jira)" <ji...@apache.org> on 2026/04/07 22:03:00 UTC
[jira] [Created] (FLINK-39408) TestNameProvider broken after JUnit 5 migration
Rui Fan created FLINK-39408:
-------------------------------
Summary: TestNameProvider broken after JUnit 5 migration
Key: FLINK-39408
URL: https://issues.apache.org/jira/browse/FLINK-39408
Project: Flink
Issue Type: Bug
Reporter: Rui Fan
Assignee: Rui Fan
Fix For: 2.3.0
`TestNameProvider.getCurrentTestName()` always returns `null` in JUnit 5 tests.
`TestNameProvider` is a JUnit 4 `TestRule`, registered via `@Rule` in `TestLogger`. After FLINK-39124 (2026-03-20) migrated `flink-tests` to JUnit 5, the `@Rule` is never triggered, so the `ThreadLocal<String> testName` is never set.
## Impact
`PseudoRandomValueSelector.randomize()` uses `TestNameProvider.getCurrentTestName()` as the random seed. When it returns `null`, all tests use `"unknown"` as seed, producing identical `Random` sequences.
Result: all boolean config randomizations (`ENABLE_UNALIGNED`, `UNALIGNED_DURING_RECOVERY_ENABLED`, `RECOVER_OUTPUT_ON_DOWNSTREAM`, etc.) always select `false`. The randomized testing of these configurations is effectively disabled — every test runs with the same fixed values.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)