[ 
https://issues.apache.org/jira/browse/FLINK-39408?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated FLINK-39408:
-----------------------------------
    Labels: pull-request-available  (was: )

> 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
>            Priority: Major
>              Labels: pull-request-available
>             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)

Reply via email to