ASF GitHub Bot commented on FLINK-8955:

Github user zentol commented on a diff in the pull request:

    --- Diff: 
    @@ -117,6 +138,7 @@ public TestEnvironment getTestEnvironment() {
        public void before() throws Exception {
    +           miniClusterResourceConfiguration = 
    --- End diff --
    That's not "easy", it doesn't even solve the issue.
    The contained `TemporaryFolder` would only be available after the 
construction of the `MiniClusterResource`, the folder is however necessary to 
create the configuration of the `MiniClusterResource`. Naturally we would like 
both of these to be `Rules`, but that's not possible unless the configuration 
is generated lazily, as i propose in the PR. Due to the `RuleChain` at the time 
that `MiniClusterResource#before` is called we can already access the 
    The alternative is for the `TemporaryFolder` to be setup in a 
`@BeforeClass` method which is then used in the for the configuration. That 
would totally works, but it is really unfortunate as the setting of temporary 
paths is rather common and required for virtually all tests that use file-based 
state backends.
    I agree that my proposal is quite hacky, but the question we have to ask is 
whether we prefer more complexity in the test vs the `MiniClusterResource`, 
where i would prefer the latter.

> Port ClassLoaderITCase to flip6
> -------------------------------
>                 Key: FLINK-8955
>                 URL: https://issues.apache.org/jira/browse/FLINK-8955
>             Project: Flink
>          Issue Type: Improvement
>          Components: Tests
>    Affects Versions: 1.5.0
>            Reporter: Chesnay Schepler
>            Assignee: Chesnay Schepler
>            Priority: Blocker
>             Fix For: 1.5.0

This message was sent by Atlassian JIRA

Reply via email to