hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Fabbri (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HADOOP-14851) LambdaTestUtils.eventually() doesn't spin on Assertion failures
Date Sat, 09 Sep 2017 03:30:02 GMT

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

Aaron Fabbri edited comment on HADOOP-14851 at 9/9/17 3:29 AM:
---------------------------------------------------------------

Committed to trunk after testing.  Thanks for your contribution [~stevel@apache.org]

(BTW, I wasn't sure if this should go on branch-2.  What is our current guidelines for backporting
s3a stuff to branch-2?)




was (Author: fabbri):
Committed to trunk after testing.  Thanks for your contribution.

(BTW, I wasn't sure if this should go on branch-2.  What is our current guidelines for backporting
s3a stuff to branch-2?)



> LambdaTestUtils.eventually() doesn't spin on Assertion failures
> ---------------------------------------------------------------
>
>                 Key: HADOOP-14851
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14851
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 2.8.1
>            Reporter: Steve Loughran
>            Assignee: Steve Loughran
>             Fix For: 3.0.0-beta1
>
>         Attachments: HADOOP-14851-001.patch, HADOOP-14851-002.patch, HADOOP-14851-003.patch
>
>
> This is funny. The {{LsmbdaTestUtils.eventually()}} method, meant to spin until a closure
stops raising exceptions, doesn't catch {{Error}} and subclasses, so doesn't fail on an {{Assert.assert()}}
failure, which raises an {{AssertionError}}. My bad :)
> Example:
> {code}
>     eventually(TIMEOUT,
>         () -> {
>           while (counter.incrementAndGet()  < 5) {
>             assert false : "oops";
>           }
>         },
>         retryLogic);
> {code}
> Fix: catch Throwable, rethrow. Needs to add VirtualMachineError & subclasses to the
set of errors not to spin on (OOM, stack overflow, ...)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message