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

Fix flaky DLP inspect tests #2359

Merged

Conversation

shubha-rajan
Copy link
Contributor

Increased the timeout period for the sample from 10 to 15 min, to resolve #2302 , #2303 , and #2317. Also refactored the Pub/Sub code in the samples to be more consistent with other samples.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 9, 2020
@shubha-rajan shubha-rajan marked this pull request as ready for review March 9, 2020 22:13
@shubha-rajan shubha-rajan requested a review from a team March 9, 2020 22:14
Copy link
Contributor

@lesv lesv left a comment

Choose a reason for hiding this comment

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

It looks Ok, and compiles, but I'm confused as I don't see the a reference to handleMessage (only the removal of it), nor do I see the code for messageHandler, though it's being set where handleMessage used to be.

I wonder if there shouldn't be some additional comments, but if you think about my comments and are still ok, feel free to merge.

@shubha-rajan
Copy link
Contributor Author

The method definition for handleMessage was moved to the bottom of the classes, and messageHandler calls it within a lambda (on line 130 of InspectBigQueryTable.java, 131 of InspectDatastoreEntity.java and 117 of InspectGcsFile.java). I agree that the samples might need some additional comments, but I'm copying the pattern already in the Risk Analysis samples, so might as well update them all at once in another PR. I'll merge this one for now.

@shubha-rajan shubha-rajan merged commit b7aff25 into GoogleCloudPlatform:master Mar 9, 2020
Sita04 pushed a commit that referenced this pull request Feb 7, 2023
* refactored and increased time limit for inspect samples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dlp.snippets.InspectTests: testInspectGcsFile failed
4 participants