thswlsqls opened a new pull request, #9510:
URL: https://github.com/apache/paimon/pull/9510

   
   ### Purpose
   
   fix #9509
   
   - `ParameterizedTestExtension` invokes the `@Parameters` provider and writes 
`@Parameter` fields reflectively without `setAccessible(true)`, so a test class 
the extension cannot access fails with `IllegalAccessException` even when the 
provider is `public static`.
   - A package-private test class is enough to trigger it: all 20 usage sites 
here are `public class`, while about a quarter of the repo's `*Test`/`*ITCase` 
classes are package-private.
   - Adds the two `setAccessible(true)` calls upstream 
`flink-test-utils-junit`, the origin of this file, added in FLINK-32058 and 
FLINK-32942. No existing test changes behavior.
   
   ### Tests
   
   - Added `ParameterizedTestExtensionTest` with two fixtures: an inaccessible 
`@Parameters` provider and an inaccessible `@Parameter` field.
   - Reverting the two lines makes them fail with 3 errors (1 provider + 2 
field invocations); with the fix all 4 pass.
   - `mvn -pl paimon-test-utils -DfailIfNoTests=false clean install` on JDK 11: 
green, checkstyle and spotless included.
   
   
   


-- 
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]

Reply via email to