Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-495] Create General Verifier for File Checksum #772

Closed

Conversation

markflyhigh
Copy link
Contributor

@markflyhigh markflyhigh commented Aug 3, 2016

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.

JIRA(https://issues.apache.org/jira/browse/BEAM-495)

Generalize FileChecksumMatcher which is from WordCountIT. FileChecksumMatcher can be used in E2E test to verify checksum of output result.

@markflyhigh markflyhigh changed the title Create file checksum verifier [BEAM-495] Create General Verifier for File Checksum Aug 3, 2016
@markflyhigh
Copy link
Contributor Author

markflyhigh commented Aug 3, 2016

+R: @jasonkuster @lukecwik

@jasonkuster
Copy link
Contributor

LGTM


thrown.expect(IllegalArgumentException.class);
thrown.expectMessage(containsString("Expected valid checksum, but received"));
new FileChecksumMatcher(null, tmpPath);
Copy link
Member

Choose a reason for hiding this comment

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

this line will throw so that means that the line below will never get called

You need to either catch and verify yourself or split this into two tests, one with null and one with ""

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

FileChecksumMatcher matcher =
new FileChecksumMatcher(
"90552392c28396935fe4f123bd0b5c2d0f6260c8",
tmpFolder.getRoot().getPath() + "/*");
Copy link
Member

Choose a reason for hiding this comment

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

Use IOChannelUtils.resolve or equivalent, your assuming all filesystems use '/' as the separator

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@markflyhigh
Copy link
Contributor Author

PTAL @lukecwik

@lukecwik
Copy link
Member

LGTM

@asfgit asfgit closed this in ad449ff Aug 11, 2016
@markflyhigh markflyhigh deleted the create-FileChecksumVerifier branch November 7, 2016 22:48
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.

None yet

3 participants