Skip to content

[BEAM-14334] Remove remaining forkEvery 1 from all Spark tests and stop mixing unit tests with runner validations. - #17662

Merged
aromanenko-dev merged 1 commit into
apache:masterfrom
mosche:BEAM-14334-RemoveRemainingForkEvery1
May 17, 2022
Merged

[BEAM-14334] Remove remaining forkEvery 1 from all Spark tests and stop mixing unit tests with runner validations.#17662
aromanenko-dev merged 1 commit into
apache:masterfrom
mosche:BEAM-14334-RemoveRemainingForkEvery1

Conversation

@mosche

Copy link
Copy Markdown
Member

This is a follow up of #17406 fixing the same issue for all remaining testing tasks. That is basically the hadoop compatibility tests and the runner validations.

Additionally this removes the current intransparent mixing of unit tests and runner validations. All tests of the project are run as part of the test task (and the hadoop compatibility tests), whereas runner validations are defined in testing only.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

…op mixing unit tests with runner validations.
@mosche

Copy link
Copy Markdown
MemberAuthor

R: @aromanenko-dev
R: @echauchot

project(":sdks:java:core").sourceSets.test.output.classesDirs,
project(":runners:core-java").sourceSets.test.output.classesDirs,
)
testClassesDirs += files(project.sourceSets.test.output.classesDirs)

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

All unit tests should be run as part of the test task

maxParallelForks 4
useJUnit {
includeCategories 'org.apache.beam.sdk.testing.ValidatesRunner'
includeCategories 'org.apache.beam.runners.spark.UsesCheckpointRecovery'

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Unit test!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do you mean?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

as said above, tests of this custom category are normal unit tests and are already run during test. there's no runner validation for such a category

@aromanenko-dev

Copy link
Copy Markdown
Contributor

Run Spark ValidatesRunner

@aromanenko-dev

Copy link
Copy Markdown
Contributor

Run Spark StructuredStreaming ValidatesRunner

@aromanenko-devaromanenko-dev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! It LGTM, just several minor questions, ptal

examplesJavaIntegrationTest
}

def sparkTestProperties(overrides = [:]) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it just refactoring (extract method)?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

yes 👍

}

maxParallelForks 4
useJUnit {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why it was removed?

@moschemoscheMay 17, 2022

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

previously these unit tests were excluded during test runs because they failed. instead these were run as part of validatesRunnerStreaming.
I fixed them so they can be run as normal unit tests, so this exclusion isn't needed any more.

maxParallelForks 4
useJUnit {
includeCategories 'org.apache.beam.sdk.testing.ValidatesRunner'
includeCategories 'org.apache.beam.runners.spark.UsesCheckpointRecovery'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do you mean?

@mosche

Copy link
Copy Markdown
MemberAuthor

Run Spark ValidatesRunner

1 similar comment
@mosche

Copy link
Copy Markdown
MemberAuthor

Run Spark ValidatesRunner

@moschemosche closed this May 17, 2022
@moschemosche reopened this May 17, 2022
@mosche

Copy link
Copy Markdown
MemberAuthor

Run Java PreCommit

1 similar comment
@mosche

Copy link
Copy Markdown
MemberAuthor

Run Java PreCommit

@mosche

Copy link
Copy Markdown
MemberAuthor

precommit issues are unrelated

@aromanenko-dev

Copy link
Copy Markdown
Contributor

Agree, it's not related to this PR

@aromanenko-dev
aromanenko-dev merged commit 8fb55ef into apache:masterMay 17, 2022
@mosche
mosche deleted the BEAM-14334-RemoveRemainingForkEvery1 branch July 22, 2022 11:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mosche@aromanenko-dev