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 A22C0200BBB for ; Thu, 27 Oct 2016 06:14:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A09EF160B04; Thu, 27 Oct 2016 04:14: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 E6449160AEE for ; Thu, 27 Oct 2016 06:13:59 +0200 (CEST) Received: (qmail 90634 invoked by uid 500); 27 Oct 2016 04:13:59 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 90596 invoked by uid 99); 27 Oct 2016 04:13:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Oct 2016 04:13:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CB9642C001E for ; Thu, 27 Oct 2016 04:13:58 +0000 (UTC) Date: Thu, 27 Oct 2016 04:13:58 +0000 (UTC) From: "Shawn McKinney (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (FC-199) GroupMgrImplTest.testRoleGroups fails apacheds MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 27 Oct 2016 04:14:00 -0000 [ https://issues.apache.org/jira/browse/FC-199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Shawn McKinney resolved FC-199. ------------------------------- Resolution: Fixed > GroupMgrImplTest.testRoleGroups fails apacheds > ---------------------------------------------- > > Key: FC-199 > URL: https://issues.apache.org/jira/browse/FC-199 > Project: FORTRESS > Issue Type: Sub-task > Affects Versions: 1.0.1 > Reporter: Shawn McKinney > Assignee: Shawn McKinney > Priority: Minor > Fix For: 2.0.0-RC1 > > > The assertEquals cannot be used to compare collections as it is dependent on processing order: > for ( String[] roleArray : roles ) > { > Role role = RoleTestData.getRole(roleArray); > List actualGroups = groupMgr.roleGroups(role); > assertEquals( CLS_NM + ".roleGroups failed", expectedGroups, actualGroups); > } > change it to iterate over each group found and compare one by one: > for ( String[] roleArray : roles ) > { > Role role = RoleTestData.getRole(roleArray); > List actualGroups = groupMgr.roleGroups(role); > assertNotNull( actualGroups ); > // The two list sizes better match or fail the test case. > assertTrue( CLS_NM + "roleGroups list size test case", actualGroups.size() == expectedGroups.size() ); > for ( Group actualGroup : actualGroups ) > { > assertTrue( CLS_NM + "...."] not found", expectedGroups.contains( actualGroup ) ); > } > } -- This message was sent by Atlassian JIRA (v6.3.4#6332)