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: use initialized logging option in constructor #843

Merged
merged 5 commits into from Jan 18, 2022
Merged

Conversation

minherz
Copy link
Contributor

@minherz minherz commented Jan 16, 2022

Use the initialized variable instead of the argument that can be null.
Add unit test to validate LoggingHandler construction with default args.

Fixes #842

@minherz minherz requested review from a team as code owners January 16, 2022 17:49
@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: logging Issues related to the googleapis/java-logging API. labels Jan 16, 2022
minherz and others added 4 commits January 18, 2022 17:52
Add unit test to validate LoggingHandler construction with default args.

Fixes #842
unit tests run without actual credentials or GCP environment is configured.
need to mock discovery of environment properties such as default project id.
change mocking GCP environment config from using MonitoredResourceUtil
to using fake system property.
@minherz minherz merged commit 99fb678 into main Jan 18, 2022
@minherz minherz deleted the minherz/842 branch January 18, 2022 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling no-arg LoggingHandler constructor calls fails with NPE
3 participants