[ 
https://issues.apache.org/jira/browse/LUCENE-7080?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15185773#comment-15185773
 ] 

Marius Grama commented on LUCENE-7080:
--------------------------------------

Even if the files collection is iterated in a sorted manner, this will not 
ensure that calling {{corruptFiles(Collection<String>)}} method twice, will 
issue the same results, because of 
{code}
int damage = randomState.nextInt(6);
{code}

> MockDirectoryWrapper relies on HashSet iteration order
> ------------------------------------------------------
>
>                 Key: LUCENE-7080
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7080
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: general/test
>    Affects Versions: 5.5, 6.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>
> MDW relies on HashSet iteration order in 
> {code}
>   public synchronized void corruptFiles(Collection<String> files) throws 
> IOException {
>     // Must make a copy because we change the incoming unsyncedFiles
>     // when we create temp files, delete, etc., below:
>     for(String name : new ArrayList<>(files)) { // <<<<< this should be sorted
>       int damage = randomState.nextInt(6);
> {code}
> this causes reproducibility issues when files get corrupted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to