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-7463] parallelize BQ IT tests #8751
Conversation
Run Python PostCommit |
R: @tvalentyn |
Hi @Juta, could you please comment which variables are being shared by test scenarios? This change should improve test parallelism in test modules that have multiple test cases, however I believe it does not remove side-effects in existing test scenarios: the tests you modify use test-case level fixtures ( From unittest docs: https://docs.python.org/3/library/unittest.html#class-and-module-fixtures
This change would indeed take effect if we used module-level or class-level fixtures (e.g. |
When the tests are run in parallel with nose they share class variables. The setup and tear down methods are called once for each test case in a class. Many of the big query test classes create a unique dataset name in the setup and delete this dataset in the tear down. Some of the tests share the same output table name This can lead to the following executions:
|
I tested this on a small usecase
and run this with If we do not specify In the bigquery tests https://github.com/apache/beam/blob/master/sdks/python/apache_beam/io/gcp/big_query_query_to_table_it_test.py#L79 it is the |
The test codesnippet you posted actually fails with and without
|
Thanks Valentyn, you are right, I didn't put my variables inside the class which indeed makes a difference.. |
Run Python PostCommit |
Run Python PostCommit |
Run Python PostCommit |
Run Python PostCommit |
Run Python PostCommit |
1 similar comment
Run Python PostCommit |
Updating
_multiprocess_can_split_ = True
makes sure that the test cases don't share any variables when run in parallel, this avoids flaky test resultsPost-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.