Skip to content

Don't convert assumption failures to errors in ErrorCollector.addError() #1703

Closed as not planned
@prbprbprb

Description

@prbprbprb

This was previously discussed in #1363 and I think the new treatment of ErrorCollector. checkSucceeds() is correct. However ErrorCollector.addError() is more commonly used when calling sub-methods or in wrapper Rules (AOSP example) so it seems clearer (to me) to pass assumption failures through.

#1702 is potential fix, although this has similar properties to what #1363 complained about, i.e. if addError() is used to add multiple assumption failures then they'll get re-thrown as a MultipleFailureException causing the test to fail. It seems to me that in that case the test probably needs restructuring anyway (e.g. to check its assumptions before calling multiple sub-methods), but I'm open to opinions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions