beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEAM-85) PAssert needs sanity check that it's used correctly
Date Tue, 13 Dec 2016 17:35:58 GMT

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

ASF GitHub Bot commented on BEAM-85:
------------------------------------

GitHub user staslev opened a pull request:

    https://github.com/apache/incubator-beam/pull/1595

    [BEAM-85,BEAM-298] Introducing TestPipelineRule.

    Be sure to do all of the following to help us incorporate your contribution
    quickly and easily:
    
     - [ ] Make sure the PR title is formatted like:
       `[BEAM-<Jira issue #>] Description of pull request`
     - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
           Travis-CI on your fork and ensure the whole test matrix passes).
     - [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
           number, if there is one.
     - [ ] If this contribution is large, please file an Apache
           [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt).
    
    ---
    
    R: @tgroh, @kennknowles.
    
    Let me know what you think.
    Once this looks good we may consider changing existing `TestPipeline` usages to `TestPipelineRule`
where applicable.

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

    $ git pull https://github.com/staslev/incubator-beam BEAM-85-and-298-making-TestPipeline-a-TestRule

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

    https://github.com/apache/incubator-beam/pull/1595.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 #1595
    
----
commit 9cb41ae501fab8355241a79986a35684f7a886a1
Author: Stas Levin <staslevin@gmail.com>
Date:   2016-12-13T17:27:41Z

    Addressing BEAM-85 and BEAM-298, introducing TestPipelineRule.

----


> PAssert needs sanity check that it's used correctly
> ---------------------------------------------------
>
>                 Key: BEAM-85
>                 URL: https://issues.apache.org/jira/browse/BEAM-85
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-java-core
>            Reporter: Daniel Halperin
>
> We should validate two things:
> # DataflowAssert is not added to a pipeline that has already been run.
> # The pipeline is run after the DataflowAssert is added.
> If either of these are not validated, then it is possible that the test doesn't actually
verify anything.
> This code should throw an assertion error or fail in some other way.
> {code}
> Pipeline p = TestPipeline.create();
> PCollection<Boolean> value = p.apply(Create.of(Boolean.FALSE));
> p.run();
> DataflowAssert.thatSingleton(value).isEqualTo(true);
> {code}
> but it would pass silently.
> similarly, this code wills pass silently:
> {code}
> Pipeline p = TestPipeline.create();
> PCollection<Boolean> value = p.apply(Create.of(Boolean.FALSE));
> DataflowAssert.thatSingleton(value).isEqualTo(true);
> {code}



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

Mime
View raw message