Skip to content

[BEAM-1551] Allow PAsserts to take a message - #2109

Merged
asfgit merged 5 commits into
apache:masterfrom
aviemzur:passert-reason-string
Mar 11, 2017
Merged

asfgit merged 5 commits into
apache:masterfrom
aviemzur:passert-reason-string

Conversation

@aviemzur

@aviemzur aviemzur commented Feb 26, 2017 •

Copy link
Copy Markdown
Member

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.

@aviemzur

Copy link
Copy Markdown
Member Author

R: @tgroh

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.04%) to 69.284% when pulling 070b9f1 on aviemzur:passert-reason-string into 4bba380 on apache:master.

@asfbot

asfbot commented Feb 26, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/7865/
--none--

}

/**
* Constructs a {@link SingletonAssert} for the value of the provided {@link PCollection}, which

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the value of the provided {@link PCollection} with the specified reason. The {@link PCollection} must have at most one value per key.

public void testEmptyFalse() throws Exception {
PCollection<Long> vals = pipeline.apply(CountingInput.upTo(5L));
PAssert.that(vals).empty();
PAssert.that("Vals should have been empty", vals).empty();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the same to a view-based assertion; I believe we already have tests for them.

It's also would be nice to ensure that by default the name of the input PCollection is present.

}

/**
* Constructs a {@link SingletonAssert} for the value of the provided {@link PCollection}.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"... with the specified reason."


/**
* Constructs a {@link SingletonAssert} for the value of the provided
* {@code PCollection PCollection<T>}, which must be a singleton.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PCollection} with the specified reason. The provided PCollection must be a singleton.

}

/**
* Constructs an {@link IterableAssert} for the value of the provided {@link PCollection} which

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with the specified reason. The provided PCollection must contain...

}

/**
* Constructs an {@link IterableAssert} for the elements of the provided {@link PCollection}.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PCollection} with the specified reason.

@tgroh

tgroh commented Feb 28, 2017

Copy link
Copy Markdown
Member

Run Flink RunnableOnService

@asfbot

asfbot commented Feb 28, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PostCommit_Java_RunnableOnService_Flink/1789/
--none--

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.2%) to 69.165% when pulling 7af2d20 on aviemzur:passert-reason-string into 4bba380 on apache:master.

@asfbot

asfbot commented Mar 1, 2017

Copy link
Copy Markdown

@aviemzur

aviemzur commented Mar 1, 2017

Copy link
Copy Markdown
Member Author

@tgroh addressed your comments in my latest 3 commits.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.1%) to 69.175% when pulling 3c802ba on aviemzur:passert-reason-string into 4bba380 on apache:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.1%) to 69.175% when pulling 3c802ba on aviemzur:passert-reason-string into 4bba380 on apache:master.

@asfbot

asfbot commented Mar 1, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/8004/
--none--

@tgroh

tgroh commented Mar 1, 2017

Copy link
Copy Markdown
Member

Run Flink RunnableOnService

@tgroh

tgroh commented Mar 1, 2017

Copy link
Copy Markdown
Member

Run Dataflow RunnableOnService

@asfbot

asfbot commented Mar 1, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PostCommit_Java_RunnableOnService_Dataflow/2440/
--none--

@tgroh

tgroh commented Mar 1, 2017

Copy link
Copy Markdown
Member

LGTM, but the flink failures do look related. Could you take a look?

@asfbot

asfbot commented Mar 10, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PostCommit_Java_RunnableOnService_Gearpump/161/
--none--

@asfbot

asfbot commented Mar 10, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PostCommit_Java_RunnableOnService_Spark/1190/
--none--

@asfbot

asfbot commented Mar 10, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PostCommit_Java_RunnableOnService_Apex/722/
--none--

@aviemzur
aviemzur force-pushed the passert-reason-string branch from 3c802ba to 3669146 Compare March 10, 2017 21:15
@aviemzur

Copy link
Copy Markdown
Member Author

Run Flink RunnableOnService

@asfbot

asfbot commented Mar 10, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PostCommit_Java_RunnableOnService_Flink/1889/
--none--

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.003%) to 70.138% when pulling 3669146 on aviemzur:passert-reason-string into e31cb2b on apache:master.

@asfbot

asfbot commented Mar 10, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/8333/
--none--

@aviemzur

Copy link
Copy Markdown
Member Author

Run Dataflow RunnableOnService

@asfbot

asfbot commented Mar 11, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PostCommit_Java_RunnableOnService_Dataflow/2523/
--none--

@aviemzur

Copy link
Copy Markdown
Member Author

Run Apex RunnableOnService

@asfbot

asfbot commented Mar 11, 2017

Copy link
Copy Markdown

@aviemzur

Copy link
Copy Markdown
Member Author

Run Spark RunnableOnService

@asfbot

asfbot commented Mar 11, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PostCommit_Java_RunnableOnService_Apex/737/
--none--

@asfbot

asfbot commented Mar 11, 2017

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PostCommit_Java_RunnableOnService_Spark/1209/
--none--


@ProcessElement
public void processElement(ProcessContext c) {
try {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suppression of exceptions was the reason the side input tests failed in Flink runner running in streaming mode.
Removing this solves the issue. All the ROS tests pass now (Including the new ones).
@kennknowles PTAL

@aviemzur

Copy link
Copy Markdown
Member Author

@tgroh committed a fix to solve the failing tests. It was an issue with PAssert itself.

@kennknowles

Copy link
Copy Markdown
Member

LGTM. I'll merge it.

@asfgit
asfgit merged commit 3669146 into apache:master Mar 11, 2017
asfgit pushed a commit that referenced this pull request Mar 11, 2017
  Remove exception suppression from PAssert.SideInputCheckerDoFn
  Added assertion failure tests for `PAssert#thatSingleton`
  Added a test of default PAssert failure reason
  Javadoc changes
  [BEAM-1551] Allow `PAssert`s to take a message
@aviemzur
aviemzur deleted the passert-reason-string branch March 11, 2017 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants