flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8778) Migrate queryable state ITCases to use MiniClusterResource
Date Tue, 27 Feb 2018 10:06:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16378331#comment-16378331

ASF GitHub Bot commented on FLINK-8778:

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

    --- Diff: flink-queryable-state/flink-queryable-state-runtime/src/test/java/org/apache/flink/queryablestate/itcases/HAQueryableStateFsBackendITCase.java
    @@ -18,28 +18,99 @@
     package org.apache.flink.queryablestate.itcases;
    +import org.apache.flink.configuration.ConfigConstants;
    +import org.apache.flink.configuration.Configuration;
    +import org.apache.flink.configuration.HighAvailabilityOptions;
    +import org.apache.flink.configuration.QueryableStateOptions;
    +import org.apache.flink.configuration.TaskManagerOptions;
    +import org.apache.flink.configuration.WebOptions;
    +import org.apache.flink.queryablestate.client.QueryableStateClient;
     import org.apache.flink.runtime.state.AbstractStateBackend;
     import org.apache.flink.runtime.state.filesystem.FsStateBackend;
    +import org.apache.flink.test.util.MiniClusterResource;
    +import org.apache.curator.test.TestingServer;
    +import org.junit.AfterClass;
     import org.junit.BeforeClass;
    -import org.junit.Rule;
    +import org.junit.ClassRule;
     import org.junit.rules.TemporaryFolder;
      * Several integration tests for queryable state using the {@link FsStateBackend}.
    -public class HAQueryableStateFsBackendITCase extends HAAbstractQueryableStateTestBase
    +public class HAQueryableStateFsBackendITCase extends AbstractQueryableStateTestBase {
    --- End diff --
    To be honest, I'm not a huge fan of inheritance when writing tests. It is really hard
to understand whats going on and it is hard to enforce invariants which are assumed by the
base class. For example, `AbstractQueryableStateTestBase` requires that the `ClusterClient`
is set to detached job submission. A user who does not know it and extends this test base
will almost certainly stumble across this. Ideally tests are succinct enough that you have
everything in a single class.

> Migrate queryable state ITCases to use MiniClusterResource
> ----------------------------------------------------------
>                 Key: FLINK-8778
>                 URL: https://issues.apache.org/jira/browse/FLINK-8778
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Tests
>            Reporter: Aljoscha Krettek
>            Assignee: Aljoscha Krettek
>            Priority: Blocker
>             Fix For: 1.5.0

This message was sent by Atlassian JIRA

View raw message