You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/02/23 13:56:44 UTC

[jira] [Commented] (METRON-728) ReaderSpliteratorTest fails randomly and extremely rarely

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

ASF GitHub Bot commented on METRON-728:
---------------------------------------

GitHub user cestella opened a pull request:

    https://github.com/apache/incubator-metron/pull/463

    METRON-728: ReaderSpliteratorTest fails randomly and extremely rarely

    This unit test is sporadic, so it's less sporadic now.
    
    * I ran the medium batch tests in question 100k times and validated that it fails without the change at least once.
    * I ran the medium batch tests in question 100k time after the change and validated that it does not fail.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/cestella/incubator-metron METRON-728

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-metron/pull/463.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #463
    
----
commit 46e7df89210a608e936082e1fa1acb21447f92fd
Author: cstella <ce...@gmail.com>
Date:   2017-02-23T13:51:33Z

    METRON-728: ReaderSpliteratorTest fails randomly and extremely rarely

----


> ReaderSpliteratorTest fails randomly and extremely rarely
> ---------------------------------------------------------
>
>                 Key: METRON-728
>                 URL: https://issues.apache.org/jira/browse/METRON-728
>             Project: Metron
>          Issue Type: Bug
>    Affects Versions: 0.3.1
>            Reporter: Justin Leet
>            Assignee: Justin Leet
>
> See logs at
> https://travis-ci.org/justinleet/incubator-metron/builds/203298348
> I was able to reproduce this locally by calling {{testActuallyParallel_mediumBatch}} in a {{while(true)}} loop. It can also occur in {{testActuallyParallel_mediumBatchImplicitlyParallel()}}.  I also had to add 
> {{forkJoinPool.shutdownNow();}} to the end of the test, because otherwise OOM errors occur.
> My current assumption is that there's no guarantee you ever actually end up running in parallel, so in extremely rare cases you just end up running one thread.
> I've had it vary wildly when I hit it, from within a second or two to running for over a minute before an assertion failure occurs.
> We could just alter the assertion to be {code}Assert.assertTrue(threads.size() <= (int) Math.ceil(9.0 / 2) && threads.size() >= 1);{code}
> This defeats the purpose of testing the parallelism a bit, but if there's no guarantee we actually get parallelism there's not a fantastic way to test it.  Given the extreme rarity, we might want to just live with the fact that occasionally {{threads.size() >= 1}} hits the threads.size() == 1 case on the two tests.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)