Skip to content

[BEAM-1369] Reduce test sizes to improve unit test speeds#1885

Closed
sb2nov wants to merge 1 commit intoapache:masterfrom
sb2nov:BEAM-improve-test-timing
Closed

[BEAM-1369] Reduce test sizes to improve unit test speeds#1885
sb2nov wants to merge 1 commit intoapache:masterfrom
sb2nov:BEAM-improve-test-timing

Conversation

@sb2nov
Copy link
Contributor

@sb2nov sb2nov commented Jan 31, 2017

R: @aaltay PTAL

These changes reduce the time taken by python unittests from 85 to 36 seconds.

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.

@aaltay
Copy link
Member

aaltay commented Jan 31, 2017

R: @chamikaramj - For the io tests especially, is there any value in keeping things larger?

@asfbot
Copy link

asfbot commented Jan 31, 2017

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

@dhalperi
Copy link
Contributor

dhalperi commented Feb 1, 2017

please tag with a JIRA before merging

@sb2nov sb2nov changed the title Reduce test sizes to improve unit test speeds [BEAM-1369] Reduce test sizes to improve unit test speeds Feb 1, 2017
@aaltay
Copy link
Member

aaltay commented Feb 1, 2017

Another related change: #1884

@sb2nov
Copy link
Contributor Author

sb2nov commented Feb 1, 2017

Let me rebase the PR

@sb2nov sb2nov force-pushed the BEAM-improve-test-timing branch from 442426e to 6aca455 Compare February 1, 2017 19:14
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 69.633% when pulling 6aca455 on sb2nov:BEAM-improve-test-timing into 420a718 on apache:master.

@asfbot
Copy link

asfbot commented Feb 1, 2017

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

@chamikaramj
Copy link
Contributor

Let's not reduce the size of test_read_without_splitting_multiple_blocks and test_read_with_splitting_multiple_blocks if they are not too expensive. These tests force Avro library to write multiple blocks without updating block size globally.

Reducing size of other tests is fine.

@sb2nov sb2nov force-pushed the BEAM-improve-test-timing branch from 6aca455 to 9a7f5d4 Compare February 2, 2017 00:27
@sb2nov
Copy link
Contributor Author

sb2nov commented Feb 2, 2017

R: @chamikaramj reverted the changes to those two tests. PTAL again.

class EstimatePiTransform(beam.PTransform):
"""Runs 10M trials, and combine the results to estimate pi."""
def __init__(self, tries_per_work_item=100000):
self.T = tries_per_work_item
Copy link
Member

Choose a reason for hiding this comment

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

Could you change T to something more clear like tries_per_work_item?

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.

@sb2nov sb2nov force-pushed the BEAM-improve-test-timing branch from 9a7f5d4 to a540ad3 Compare February 2, 2017 00:36
@aaltay
Copy link
Member

aaltay commented Feb 2, 2017

Thank you. LGTM. will wait for tests to complete.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.003%) to 69.64% when pulling a540ad3 on sb2nov:BEAM-improve-test-timing into 0e6b379 on apache:master.

@asfbot
Copy link

asfbot commented Feb 2, 2017

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

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.003%) to 69.64% when pulling a540ad3 on sb2nov:BEAM-improve-test-timing into 0e6b379 on apache:master.

@asfbot
Copy link

asfbot commented Feb 2, 2017

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

@asfgit asfgit closed this in 168d6a1 Feb 2, 2017
@sb2nov sb2nov deleted the BEAM-improve-test-timing branch February 8, 2017 17:31
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