Skip to content

[BEAM-5142] Improve PubsubIT#6214

Merged
akedin merged 1 commit intoapache:masterfrom
amaliujia:rui_wang-improve_tests
Aug 14, 2018
Merged

[BEAM-5142] Improve PubsubIT#6214
akedin merged 1 commit intoapache:masterfrom
amaliujia:rui_wang-improve_tests

Conversation

@amaliujia
Copy link
Copy Markdown
Contributor

@amaliujia amaliujia commented Aug 13, 2018

Improve PubsubIT by removing Thread.sleep and using eventsTopic.checkIfAnySubscriptionExists.


Follow this checklist to help us incorporate your contribution quickly and easily:

  • 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.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

It will help us expedite review of your Pull Request if you tag someone (e.g. @username) to look at it.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- --- --- --- ---
Java Build Status Build Status Build Status Build Status Build Status Build Status Build Status
Python Build Status --- Build Status
Build Status
--- --- --- ---

@amaliujia
Copy link
Copy Markdown
Contributor Author

run java postcommit

3 similar comments
@amaliujia
Copy link
Copy Markdown
Contributor Author

run java postcommit

@amaliujia
Copy link
Copy Markdown
Contributor Author

run java postcommit

@amaliujia
Copy link
Copy Markdown
Contributor Author

run java postcommit

@amaliujia
Copy link
Copy Markdown
Contributor Author

R: @apilloud @akedin


// wait one minute to allow subscription creation.
Thread.sleep(60 * 1000);
eventsTopic.checkIfAnySubscriptionExists(project, Duration.standardMinutes(1));
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.

It would be more correct to pull project out of the pipeline you're using here, rather then from TestPipeline globally. I believe pipeline.getOptions().as(GcpOptions.class).getProject() should work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The project option is set for TestPipelineOption from build.gradle so it's supposed to have the same value.

But yes, I agree that I should get project from existing pipeline.

@amaliujia amaliujia force-pushed the rui_wang-improve_tests branch from 84a7931 to 4acbd75 Compare August 13, 2018 23:46
@amaliujia
Copy link
Copy Markdown
Contributor Author

run java postcommit

@apilloud
Copy link
Copy Markdown
Member

LGTM! Thanks!


// wait one minute to allow subscription creation.
Thread.sleep(60 * 1000);
eventsTopic.checkIfAnySubscriptionExists(
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.

remove the comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ha.. Good catch!

@amaliujia amaliujia force-pushed the rui_wang-improve_tests branch from 4acbd75 to c77eeff Compare August 14, 2018 17:50
@amaliujia
Copy link
Copy Markdown
Contributor Author

run java postcommit

@akedin akedin merged commit 64bfe12 into apache:master Aug 14, 2018
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.

3 participants