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 F33BB200C00 for ; Wed, 4 Jan 2017 01:08:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id F1ECF160B43; Wed, 4 Jan 2017 00:08:00 +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 48956160B49 for ; Wed, 4 Jan 2017 01:08:00 +0100 (CET) Received: (qmail 51404 invoked by uid 500); 4 Jan 2017 00:07:59 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 50831 invoked by uid 99); 4 Jan 2017 00:07:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2017 00:07:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BEB692C2AC2 for ; Wed, 4 Jan 2017 00:07:58 +0000 (UTC) Date: Wed, 4 Jan 2017 00:07:58 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZOOKEEPER-2656) Fix ServerConfigTest#testValidArguments test case failures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 04 Jan 2017 00:08:01 -0000 [ https://issues.apache.org/jira/browse/ZOOKEEPER-2656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15796634#comment-15796634 ] ASF GitHub Bot commented on ZOOKEEPER-2656: ------------------------------------------- Github user eribeiro commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/140#discussion_r94510094 --- Diff: src/java/test/org/apache/zookeeper/ServerConfigTest.java --- @@ -57,4 +59,16 @@ public void testTooManyArguments() { String[] args = {"2181", "/data/dir", "60000", "10000", "9999"}; serverConfig.parse(args); } -} + + boolean checkEquality(String a, String b) { + return a != null && a.equals(b); + } + + boolean checkEquality(String a, File b) { + try { + return a != null && b != null && new File(a).getCanonicalPath().equals(b.getCanonicalPath()); + } catch (IOException e) { --- End diff -- Oh, I see. It is because the method overloading. But could we add a comment like ``//DO NOTHING`` or maybe log the error in the ``catch`` body? Empty catch blocks make me uncomfortable. :) But I am fine as is, nevertheless. > Fix ServerConfigTest#testValidArguments test case failures > ---------------------------------------------------------- > > Key: ZOOKEEPER-2656 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2656 > Project: ZooKeeper > Issue Type: Test > Reporter: Rakesh R > Assignee: Michael Han > Fix For: 3.4.10, 3.5.3, 3.6.0 > > > This jira to fix ServerConfigTest#testValidArguments test case failure. Reference: https://builds.apache.org/job/ZooKeeper-trunk/3207/testReport/org.apache.zookeeper/ServerConfigTest/testValidArguments/ > {code} > Error Message > expected: java.lang.String but was: java.io.File > Stacktrace > junit.framework.AssertionFailedError: expected: java.lang.String but was: java.io.File > at org.apache.zookeeper.ServerConfigTest.testValidArguments(ServerConfigTest.java:48) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)