Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7F8AC200D63 for ; Thu, 21 Dec 2017 12:54:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7E80F160C2B; Thu, 21 Dec 2017 11:54:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C4A9B160C1A for ; Thu, 21 Dec 2017 12:54:03 +0100 (CET) Received: (qmail 31144 invoked by uid 500); 21 Dec 2017 11:54:03 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 31133 invoked by uid 99); 21 Dec 2017 11:54:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Dec 2017 11:54:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 729381A10A5 for ; Thu, 21 Dec 2017 11:54:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id C6Pmbi0LI6aL for ; Thu, 21 Dec 2017 11:54:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id DC23A5F30B for ; Thu, 21 Dec 2017 11:54:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 533DFE01A8 for ; Thu, 21 Dec 2017 11:54:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0F8A9212F8 for ; Thu, 21 Dec 2017 11:54:00 +0000 (UTC) Date: Thu, 21 Dec 2017 11:54:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-7909) Unify cluster creation for test bases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 21 Dec 2017 11:54:04 -0000 [ https://issues.apache.org/jira/browse/FLINK-7909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16299909#comment-16299909 ] ASF GitHub Bot commented on FLINK-7909: --------------------------------------- Github user GJL commented on a diff in the pull request: https://github.com/apache/flink/pull/4896#discussion_r158259149 --- Diff: flink-connectors/flink-connector-filesystem/src/test/java/org/apache/flink/streaming/connectors/fs/RollingSinkSecuredITCase.java --- @@ -215,23 +211,15 @@ private static void startSecureFlinkClusterWithRecoveryModeEnabled() { dfs.mkdirs(new Path("/flink/checkpoints")); dfs.mkdirs(new Path("/flink/recovery")); - org.apache.flink.configuration.Configuration config = new org.apache.flink.configuration.Configuration(); - - config.setInteger(ConfigConstants.LOCAL_NUMBER_TASK_MANAGER, 1); - config.setInteger(ConfigConstants.TASK_MANAGER_NUM_TASK_SLOTS, DEFAULT_PARALLELISM); - config.setBoolean(ConfigConstants.LOCAL_START_WEBSERVER, false); - config.setInteger(ConfigConstants.LOCAL_NUMBER_JOB_MANAGER, 3); - config.setString(HighAvailabilityOptions.HA_MODE, "zookeeper"); - config.setString(CoreOptions.STATE_BACKEND, "filesystem"); - config.setString(HighAvailabilityOptions.HA_ZOOKEEPER_CHECKPOINTS_PATH, hdfsURI + "/flink/checkpoints"); - config.setString(HighAvailabilityOptions.HA_STORAGE_PATH, hdfsURI + "/flink/recovery"); - config.setString("state.backend.fs.checkpointdir", hdfsURI + "/flink/checkpoints"); - - SecureTestEnvironment.populateFlinkSecureConfigurations(config); - - cluster = TestBaseUtils.startCluster(config, false); - TestStreamEnvironment.setAsContext(cluster, DEFAULT_PARALLELISM); + MINICLUSTER_CONFIGURATION.setBoolean(ConfigConstants.LOCAL_START_WEBSERVER, false); --- End diff -- Because of this: ``` private static void skipIfHadoopVersionIsNotAppropriate() { // Skips all tests if the Hadoop version doesn't match String hadoopVersionString = VersionInfo.getVersion(); String[] split = hadoopVersionString.split("\\."); if (split.length != 3) { throw new IllegalStateException("Hadoop version was not of format 'X.X.X': " + hadoopVersionString); } Assume.assumeTrue( // check whether we're running Hadoop version >= 3.x.x Integer.parseInt(split[0]) >= 3 ); } ``` I assume that the test will never run. I wonder if the test has ever worked correctly. > Unify cluster creation for test bases > ------------------------------------- > > Key: FLINK-7909 > URL: https://issues.apache.org/jira/browse/FLINK-7909 > Project: Flink > Issue Type: Improvement > Components: Tests > Affects Versions: 1.4.0 > Reporter: Till Rohrmann > Assignee: Till Rohrmann > > Flink contains different test bases, e.g. {{AbstractTestBase}}, {{MultipleProgramsTestBase}}, {{JavaProgramTestBase}} and the {{StreamingMultipleProgramsTestBase}}. Some of them start resources ({{FlinkMiniCluster}}) automatically, while others expose a start method. Some test bases set the {{ExecutionEnvironment}} while others use the {{FlinkMiniCluster}} directly. In order to make things more maintainable I propose to unify these test bases a bit and introduce an {{ExternalResource}} which encapsulates the resource start up and shut down. -- This message was sent by Atlassian JIRA (v6.4.14#64029)