Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0391617974 for ; Wed, 29 Oct 2014 05:02:34 +0000 (UTC) Received: (qmail 53706 invoked by uid 500); 29 Oct 2014 05:02:33 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 53664 invoked by uid 500); 29 Oct 2014 05:02:33 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 53653 invoked by uid 99); 29 Oct 2014 05:02:33 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Oct 2014 05:02:33 +0000 Date: Wed, 29 Oct 2014 05:02:33 +0000 (UTC) From: "Robert Kanter (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (YARN-2766) [JDK 8] TestApplicationHistoryClientService fails 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/YARN-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Kanter updated YARN-2766: -------------------------------- Attachment: YARN-2766.patch The patch creates a consistent ordering by sorting the Collection before the assert statements. There was similar code in {{testApplications}} so I sorted there as well just in case. > [JDK 8] TestApplicationHistoryClientService fails > ------------------------------------------------- > > Key: YARN-2766 > URL: https://issues.apache.org/jira/browse/YARN-2766 > Project: Hadoop YARN > Issue Type: Sub-task > Components: timelineserver > Affects Versions: 2.6.0 > Reporter: Robert Kanter > Assignee: Robert Kanter > Attachments: YARN-2766.patch > > > {{TestApplicationHistoryClientService.testContainers}} and {{TestApplicationHistoryClientService.testApplicationAttempts}} both fail because the test assertions are assuming a returned Collection is in a certain order. The collection comes from a HashMap, so the order is not guaranteed, plus, according to [this page|http://docs.oracle.com/javase/8/docs/technotes/guides/collections/changes8.html], there are situations where the iteration order of a HashMap will be different between Java 7 and 8. > We should fix the test code to not assume a specific ordering. -- This message was sent by Atlassian JIRA (v6.3.4#6332)