[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-11 Thread Steve Loughran (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Loughran updated HADOOP-16847:

Fix Version/s: 3.2.2
   3.3.0

> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: test
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Assignee: testfixer0
>Priority: Minor
> Fix For: 3.3.0, 3.2.2
>
> Attachments: HADOOP-16847-000.patch, HADOOP-16847-000.patch, 
> HADOOP-16874-001.patch
>
>
> The test `testNegativeGroupCaching` can fail if the iteration order of 
> HashSet changes. In detail, the method `assertEquals` (line 331) compares 
> `groups.getGroups(user)` with an ArrayList `myGroups`. The method `getGroups` 
> converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
> However, the iteration is non-deterministic.
> This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-11 Thread Steve Loughran (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Loughran updated HADOOP-16847:

Component/s: (was: security)
 test

> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: test
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Assignee: testfixer0
>Priority: Minor
> Attachments: HADOOP-16847-000.patch, HADOOP-16847-000.patch, 
> HADOOP-16874-001.patch
>
>
> The test `testNegativeGroupCaching` can fail if the iteration order of 
> HashSet changes. In detail, the method `assertEquals` (line 331) compares 
> `groups.getGroups(user)` with an ArrayList `myGroups`. The method `getGroups` 
> converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
> However, the iteration is non-deterministic.
> This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-07 Thread testfixer0 (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated HADOOP-16847:

Description: 
The test `testNegativeGroupCaching` can fail if the iteration order of HashSet 
changes. In detail, the method `assertEquals` (line 331) compares 
`groups.getGroups(user)` with an ArrayList `myGroups`. The method `getGroups` 
converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
However, the iteration is non-deterministic.

This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.

  was:
The method `testNegativeGroupCaching` can fail if the iteration order of 
HashSet changes. In detail, the method `assertEquals` (line 331) compares 
`groups.getGroups(user)` with a ArrayList `myGroups`. The method `getGroups` 
converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
However, the iteration is non-deterministic.

This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.


> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: security
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Priority: Minor
> Attachments: HADOOP-16847-000.patch, HADOOP-16847-000.patch, 
> HADOOP-16874-001.patch
>
>
> The test `testNegativeGroupCaching` can fail if the iteration order of 
> HashSet changes. In detail, the method `assertEquals` (line 331) compares 
> `groups.getGroups(user)` with an ArrayList `myGroups`. The method `getGroups` 
> converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
> However, the iteration is non-deterministic.
> This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-07 Thread testfixer0 (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated HADOOP-16847:

Attachment: HADOOP-16874-001.patch

> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: security
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Priority: Minor
> Attachments: HADOOP-16847-000.patch, HADOOP-16847-000.patch, 
> HADOOP-16874-001.patch
>
>
> The method `testNegativeGroupCaching` can fail if the iteration order of 
> HashSet changes. In detail, the method `assertEquals` (line 331) compares 
> `groups.getGroups(user)` with a ArrayList `myGroups`. The method `getGroups` 
> converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
> However, the iteration is non-deterministic.
> This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-07 Thread testfixer0 (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated HADOOP-16847:

Description: 
The method `testNegativeGroupCaching` can fail if the iteration order of 
HashSet changes. In detail, the method `assertEquals` (line 331) compares 
`groups.getGroups(user)` with a ArrayList `myGroups`. The method `getGroups` 
converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
However, the iteration is non-deterministic.

This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.

  was:
The method `testNegativeGroupCaching` can fail if the iteration order of 
HashSet changes. In detail, the method `assertEquals` (line 331) compare 
`groups.getGroups(user)` with a ArrayList `myGroups`. The method `getGroups` 
converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
However, the iteration is non-deterministic.

This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.


> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: security
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Priority: Minor
> Attachments: HADOOP-16847-000.patch, HADOOP-16847-000.patch
>
>
> The method `testNegativeGroupCaching` can fail if the iteration order of 
> HashSet changes. In detail, the method `assertEquals` (line 331) compares 
> `groups.getGroups(user)` with a ArrayList `myGroups`. The method `getGroups` 
> converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
> However, the iteration is non-deterministic.
> This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-07 Thread testfixer0 (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated HADOOP-16847:

Description: 
The method `testNegativeGroupCaching` can fail if the iteration order of 
HashSet changes. In detail, the method `assertEquals` (line 331) compare 
`groups.getGroups(user)` with a ArrayList `myGroups`. The method `getGroups` 
converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
However, the iteration is non-deterministic.

This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.

  was:
The method `testNegativeGroupCaching` in `TestGroupsCaching` can fail if the 
iteration order of HashSet changes. In detail, in line 331, the method 
`assertEquals` compare `groups.getGroups(user)` with a ArrayList `myGroups` . 
However,  `groups.getGroups(user)` is related with  `FakeGroupMapping`. The 
variables `allGroups` and `blackList` are defined as HashSet in 
`FakeGroupMapping`, and it can iterate in a different order.

This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.


> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: security
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Priority: Minor
> Attachments: HADOOP-16847-000.patch, HADOOP-16847-000.patch
>
>
> The method `testNegativeGroupCaching` can fail if the iteration order of 
> HashSet changes. In detail, the method `assertEquals` (line 331) compare 
> `groups.getGroups(user)` with a ArrayList `myGroups`. The method `getGroups` 
> converts `allGroups` (a HashSet) to a list and it calls iterator in HashSet. 
> However, the iteration is non-deterministic.
> This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-07 Thread testfixer0 (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated HADOOP-16847:

Description: 
The method `testNegativeGroupCaching` in `TestGroupsCaching` can fail if the 
iteration order of HashSet changes. In detail, in line 331, the method 
`assertEquals` compare `groups.getGroups(user)` with a ArrayList `myGroups` . 
However,  `groups.getGroups(user)` is related with  `FakeGroupMapping`. The 
variables `allGroups` and `blackList` are defined as HashSet in 
`FakeGroupMapping`, and it can iterate in a different order.

This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.

  was:The method `testNegativeGroupCaching` can fail if the iteration order of 
HashSet changes. So, this PR proposes to modify HashSet to LinkedHashSet for a 
deterministic order


> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: security
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Priority: Minor
> Attachments: HADOOP-16847-000.patch, HADOOP-16847-000.patch
>
>
> The method `testNegativeGroupCaching` in `TestGroupsCaching` can fail if the 
> iteration order of HashSet changes. In detail, in line 331, the method 
> `assertEquals` compare `groups.getGroups(user)` with a ArrayList `myGroups` . 
> However,  `groups.getGroups(user)` is related with  `FakeGroupMapping`. The 
> variables `allGroups` and `blackList` are defined as HashSet in 
> `FakeGroupMapping`, and it can iterate in a different order.
> This PR proposes to modify HashSet to LinkedHashSet for a deterministic order.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-07 Thread testfixer0 (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated HADOOP-16847:

Priority: Minor  (was: Major)

> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: security
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Priority: Minor
> Attachments: HADOOP-16847-000.patch, HADOOP-16847-000.patch
>
>
> The method `testNegativeGroupCaching` can fail if the iteration order of 
> HashSet changes. So, this PR proposes to modify HashSet to LinkedHashSet for 
> a deterministic order



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-06 Thread testfixer0 (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated HADOOP-16847:

Attachment: HADOOP-16847-000.patch
Status: Patch Available  (was: Open)

The method `testNegativeGroupCaching` can fail if the iteration order of 
HashSet changes. So, this PR proposes to modify HashSet to LinkedHashSet for a 
deterministic order

> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: security
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Priority: Major
> Attachments: HADOOP-16847-000.patch, HADOOP-16847-000.patch
>
>
> The method `testNegativeGroupCaching` can fail if the iteration order of 
> HashSet changes. So, this PR proposes to modify HashSet to LinkedHashSet for 
> a deterministic order



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-06 Thread testfixer0 (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated HADOOP-16847:

Attachment: HADOOP-16847-000.patch

> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: security
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Priority: Major
> Attachments: HADOOP-16847-000.patch
>
>
> The method `testNegativeGroupCaching` can fail if the iteration order of 
> HashSet changes. So, this PR proposes to modify HashSet to LinkedHashSet for 
> a deterministic order



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-06 Thread testfixer0 (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated HADOOP-16847:

Description: The method `testNegativeGroupCaching` can fail if the 
iteration order of HashSet changes. So, this PR proposes to modify HashSet to 
LinkedHashSet for a deterministic order  (was: -private static Set 
allGroups = new HashSet();
-private static Set blackList = new HashSet();
+private static Set allGroups = new LinkedHashSet();
+private static Set blackList = new LinkedHashSet();)

> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: security
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Priority: Major
>
> The method `testNegativeGroupCaching` can fail if the iteration order of 
> HashSet changes. So, this PR proposes to modify HashSet to LinkedHashSet for 
> a deterministic order



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Updated] (HADOOP-16847) Test can fail if HashSet iterates in a different order

2020-02-06 Thread testfixer0 (Jira)


 [ 
https://issues.apache.org/jira/browse/HADOOP-16847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

testfixer0 updated HADOOP-16847:

Affects Version/s: 3.2.1

> Test can fail if HashSet iterates in a different order
> --
>
> Key: HADOOP-16847
> URL: https://issues.apache.org/jira/browse/HADOOP-16847
> Project: Hadoop Common
>  Issue Type: Improvement
>  Components: security
>Affects Versions: 3.2.1
>Reporter: testfixer0
>Priority: Major
>
> -private static Set allGroups = new HashSet();
> -private static Set blackList = new HashSet();
> +private static Set allGroups = new LinkedHashSet();
> +private static Set blackList = new LinkedHashSet();



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org