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

[dlp] inspect_content_test.py::test_inspect_datastore is potentially broken #3422

Closed
tmatsuo opened this issue Apr 17, 2020 · 2 comments · Fixed by #3925
Closed

[dlp] inspect_content_test.py::test_inspect_datastore is potentially broken #3422

tmatsuo opened this issue Apr 17, 2020 · 2 comments · Fixed by #3925
Assignees
Labels
api: dlp Issues related to the Sensitive Data Protection API. priority: p2 Moderately-important priority. Fix may not be included in next release. testing

Comments

@tmatsuo
Copy link
Contributor

tmatsuo commented Apr 17, 2020

The following tests are potentially broken:

dlp/inspect_content_test.py::test_inspect_datastore
dlp/inspect_content_test.py::test_inspect_datastore_no_results

Once merged, #3420 will fix the timeout issue on our builds.

#3420 also will make a change for the test behavior. Previously, these tests are trying to check if the callback function in the sample has been called as expected.

Previous assertion:

assert "Info type: EMAIL_ADDRESS" in out

Current assertion:

assert "Inspection operation started" in out

As far as I tried, the callback was never called even with timeout of 420 seconds. That's why the test is now only checking if the operation was successfully started.

It's great if we can do the following:

  1. debug why the callback is not called
  2. test if the callback is called again

@andrewsg Do you have any insight? I'm asking because you're the original author.

@tmatsuo tmatsuo added testing api: dlp Issues related to the Sensitive Data Protection API. labels Apr 17, 2020
@tmatsuo tmatsuo added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Apr 17, 2020
@andrewsg
Copy link
Member

Sorry for the delay. The only insight I have right now is that all of the pubsub callback functionality has been tempermental, at best, for as long as I've used the API. It was difficult to get it to work in the first place, in particular because there's no real visibility into why the callback wouldn't happen or what's happening on the remote host. Sorry I can't be more help =(

@tmatsuo
Copy link
Contributor Author

tmatsuo commented Jun 1, 2020

I fixed another issue in risk_test.py with #3919

Maybe we can do similar thing to make it work again.

@tmatsuo tmatsuo assigned tmatsuo and unassigned andrewsg and leahecole Jun 1, 2020
tmatsuo pushed a commit to tmatsuo/python-docs-samples that referenced this issue Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: dlp Issues related to the Sensitive Data Protection API. priority: p2 Moderately-important priority. Fix may not be included in next release. testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants