From dev-return-35633-archive-asf-public=cust-asf.ponee.io@sqoop.apache.org Wed Feb 14 20:04:14 2018 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 mx-eu-01.ponee.io (Postfix) with SMTP id 70D25180621 for ; Wed, 14 Feb 2018 20:04:13 +0100 (CET) Received: (qmail 78820 invoked by uid 500); 14 Feb 2018 19:04:12 -0000 Mailing-List: contact dev-help@sqoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sqoop.apache.org Delivered-To: mailing list dev@sqoop.apache.org Received: (qmail 78809 invoked by uid 99); 14 Feb 2018 19:04:12 -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, 14 Feb 2018 19:04:12 +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 E5A8B180146 for ; Wed, 14 Feb 2018 19:04:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, 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-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id Qhlwl8YV4GHc for ; Wed, 14 Feb 2018 19:04:11 +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 05A9E60F04 for ; Wed, 14 Feb 2018 19:04:11 +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 8C681E00EA for ; Wed, 14 Feb 2018 19:04:05 +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 4596C240F2 for ; Wed, 14 Feb 2018 19:04:00 +0000 (UTC) Date: Wed, 14 Feb 2018 19:04:00 +0000 (UTC) From: "Hudson (JIRA)" To: dev@sqoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SQOOP-3283) MySQL thirdparty tests hang if there's no USER environment variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SQOOP-3283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16364622#comment-16364622 ] Hudson commented on SQOOP-3283: ------------------------------- SUCCESS: Integrated in Jenkins build Sqoop-hadoop200 #1148 (See [https://builds.apache.org/job/Sqoop-hadoop200/1148/]) SQOOP-3283: Fixing MySQL 3rd party test hanging issue by getting (maugli: [https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=3153c3610da7e5db388bfb14f3681d308e9e89c6]) * (edit) src/test/org/apache/sqoop/manager/mysql/MySQLTestUtils.java > MySQL thirdparty tests hang if there's no USER environment variable > ------------------------------------------------------------------- > > Key: SQOOP-3283 > URL: https://issues.apache.org/jira/browse/SQOOP-3283 > Project: Sqoop > Issue Type: Bug > Components: connectors/mysql, test > Affects Versions: 1.4.7 > Reporter: Daniel Voros > Assignee: Daniel Voros > Priority: Minor > Fix For: 1.5.0 > > Attachments: SQOOP-3283.1.patch, SQOOP-3283.2.patch > > > {{org.apache.sqoop.manager.mysql.MySQLTestUtils#getCurrentUser()}} executes {{whoami}} in a subprocess if there's no USER environment variable (happened to me while running tests from Docker). However, it waits for the Process variable to become null, that never happens: > {code:java} > // wait for whoami to exit. > while (p != null) { > try { > int ret = p.waitFor(); > if (0 != ret) { > LOG.error("whoami exited with error status " + ret); > // suppress original return value from this method. > return null; > } > } catch (InterruptedException ie) { > continue; // loop around. > } > } > {code} > We could get rid of the while loop since {{Process#waitFor()}} blocks while it completes. > Note, that it's easy to workaround the issue by setting the USER environment variable when running the tests. -- This message was sent by Atlassian JIRA (v7.6.3#76005)