Search before asking
Paimon version
master @ da71a66 (2.1-SNAPSHOT)
Compute Engine
Engine-agnostic (paimon-test-utils)
Minimal reproduce step
ParameterizedTestExtension invokes the @Parameters provider and writes @Parameter fields reflectively, but never calls setAccessible(true). A package-private test class breaks it even with a public static provider, because the declaring class itself is not accessible from the extension's package:
@ExtendWith(ParameterizedTestExtension.class)
class MyTest { // package-private
@Parameter public String value;
@Parameters public static List<String> parameters() { return Arrays.asList("a"); }
@TestTemplate void test() {}
}
Result: IllegalAccessException: ... cannot access a member of class ... with modifiers "public static". Private providers and private @Parameter fields fail the same way.
What doesn't meet your expectations?
Parameter injection should work regardless of the test class's and members' visibility.
Anything else?
All 20 usage sites in this repo are public class, necessarily so. About a quarter of the repo's *Test/*ITCase classes are package-private, so that style cannot use this extension. Upstream flink-test-utils-junit, which this file was ported from, added both setAccessible(true) calls (FLINK-32058, FLINK-32942). No existing test breaks today.
Are you willing to submit a PR?
Search before asking
Paimon version
master @ da71a66 (2.1-SNAPSHOT)
Compute Engine
Engine-agnostic (
paimon-test-utils)Minimal reproduce step
ParameterizedTestExtensioninvokes the@Parametersprovider and writes@Parameterfields reflectively, but never callssetAccessible(true). A package-private test class breaks it even with apublic staticprovider, because the declaring class itself is not accessible from the extension's package:Result:
IllegalAccessException: ... cannot access a member of class ... with modifiers "public static". Private providers and private@Parameterfields fail the same way.What doesn't meet your expectations?
Parameter injection should work regardless of the test class's and members' visibility.
Anything else?
All 20 usage sites in this repo are
public class, necessarily so. About a quarter of the repo's*Test/*ITCaseclasses are package-private, so that style cannot use this extension. Upstreamflink-test-utils-junit, which this file was ported from, added bothsetAccessible(true)calls (FLINK-32058, FLINK-32942). No existing test breaks today.Are you willing to submit a PR?