Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io 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 695A6160C1B for ; Wed, 3 Jan 2018 20:01:05 +0100 (CET) Received: (qmail 17029 invoked by uid 500); 3 Jan 2018 19:01:04 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 17020 invoked by uid 99); 3 Jan 2018 19:01:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jan 2018 19:01:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 147A11805E0 for ; Wed, 3 Jan 2018 19:01:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -107.211 X-Spam-Level: X-Spam-Status: No, score=-107.211 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ox1DNXc-KM_8 for ; Wed, 3 Jan 2018 19:01:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3ACF65F2F0 for ; Wed, 3 Jan 2018 19:01:02 +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 7E98DE0EEF for ; Wed, 3 Jan 2018 19:01:01 +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 43C23240F2 for ; Wed, 3 Jan 2018 19:01:01 +0000 (UTC) Date: Wed, 3 Jan 2018 19:01:01 +0000 (UTC) From: "Kenneth Howe (JIRA)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-3584) Refactor ServerLauncher and LocatorLauncher to eliminate code duplication MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 03 Jan 2018 19:01:06 -0000 [ https://issues.apache.org/jira/browse/GEODE-3584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16310097#comment-16310097 ] Kenneth Howe commented on GEODE-3584: ------------------------------------- Thanks for your input. If you haven't reviewed the Apache Geode wiki yet I'd start here (can answer some basic questions on running tests and using an IDE): https://cwiki.apache.org/confluence/display/GEODE/Getting+Started+for+Geode+Developers Regarding your original questions: 2. For measuring test coverage I would strongly suggest using the Eclipse or Intellij for your development environment. Both IDEs offer coverage tools/plugins. You can then run, run with coverage, or debug entire test classes or single tests within a class directly through the IDE. For running with coverage, the covered code is then highlighted in the IDE editor pane. 3. In general several smaller patches (pull requests) are preferred. You are likely to have fewer merge conflicts with other ongoing work with small localized PRs. 4. For running a few test classes I would run them individually in the IDE. For running more than a few you could run them from a shell using the gradlew command for running single tests as shown in the Wiki page I referenced. For instance to run the tests {{AbstractLauncherIntegrationTest}}, {{LocatorLauncherIntegrationTest}}, and {{ServerLauncherIntegrationTest}} your shell commands would be {{code}} ./gradlew -DintegrationTest.single=AbstractLauncherIntegrationTest integrationTest ./gradlew -DintegrationTest.single=LocatorLauncherIntegrationTest integrationTest ./gradlew -DintegrationTest.single=ServerLauncherIntegrationTest integrationTest {{code}} For the {{testType}} look at the Category annotation in the test class declaration. > Refactor ServerLauncher and LocatorLauncher to eliminate code duplication > ------------------------------------------------------------------------- > > Key: GEODE-3584 > URL: https://issues.apache.org/jira/browse/GEODE-3584 > Project: Geode > Issue Type: Improvement > Components: gfsh > Affects Versions: 1.2.0 > Reporter: Kenneth Howe > > There is some duplication of code in the Launcher classes that can be eliminated. Both classes have methods such as getBindAddress (called getServerBindAddress in ServerLauncher) that could be hoisted into AbstractLauncher class that they both extend. The same goes for the inner State classes of the Launchers; they have methods that could be moved to AbstractLauncher.ServiceState. -- This message was sent by Atlassian JIRA (v6.4.14#64029)