You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by jkff <gi...@git.apache.org> on 2016/09/27 00:45:37 UTC

[GitHub] incubator-beam pull request #1011: Support for @Setup and @Teardown in DoFnT...

GitHub user jkff opened a pull request:

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

    Support for @Setup and @Teardown in DoFnTester

    - To allow testing DoFn reuse, adds a third cloning mode - CLONE_ONCE. The current CLONE is renamed to CLONE_PER_BUNDLE because it corresponds to the olden ways of DoFnTester. This rename should be harmless because it was the default, so probably nobody uses it (nobody uses it in the Beam codebase anyway), but I can rename it back if necessary.
    - Calls Setup lazily on the first interaction with the fn under test: depending on cloning mode, this is either a per-bundle clone, or the original fn, or a single clone of the original fn.
    - Calls Teardown either when the DoFnTester is closed, or when finishBundle'ing with CLONE_PER_BUNDLE.
    - Enforces that you have to configure the DoFnTester (setSideInputs, setCloningBehavior) before using it, to simplify the semantics. Makes setSideInputs consistent with setSideInput(without "s") in not resetting the state.
    - Allows processing a bundle after processing an element. This used to be disallowed, but it's weird, because processing a bundle after processing a bundle *was* allowed.
    
    Additionally, improves testing coverage.

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

    $ git pull https://github.com/jkff/incubator-beam do-fn-tester-lifecycle

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

    https://github.com/apache/incubator-beam/pull/1011.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 #1011
    
----
commit 62ec3ed9bfa0bb94c41b0df4761d5d50cb4d196a
Author: Eugene Kirpichov <ki...@google.com>
Date:   2016-09-26T23:58:20Z

    Support for @Setup and @Teardown in DoFnTester

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-beam pull request #1011: [BEAM-559] Support for @Setup and @Teardo...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---