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

Remove incorrect assertions from logging lifecycle observers #2644

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

idelpivnitskiy
Copy link
Member

@idelpivnitskiy idelpivnitskiy commented Jul 5, 2023

Motivation:

If request is retried multiple times, multiple callbacks can be invoked
multiple times (for every retry attempt) when logging observers are
applied at the client level.

Modifications:

  • Remove some assertions from
    LoggingGrpcLifecycleObserver and LoggingHttpLifecycleObserver;
  • Clarify some expectations in HttpLifecycleObserver javadoc;

Result:

No AssertionError in tests that can retry.

@idelpivnitskiy idelpivnitskiy requested a review from daschl July 5, 2023 18:55
@idelpivnitskiy idelpivnitskiy self-assigned this Jul 5, 2023
Motivation:

If request is retried multiple times, multiple callbacks can be invoked
multiple times (for every retry attempt) when logging observers are
applied at the client level.

Modifications:

- Remove some assertions from
`LoggingGrpcLifecycleObserver` and `LoggingHttpLifecycleObserver`;
- Clarify some expectations in `HttpLifecycleObserver` javadoc;

Result:

No `AssertionError` in tests that can retry.
@idelpivnitskiy idelpivnitskiy changed the title Remove assertion from logging observers onConnectionSelected Remove incorrect assertions from logging lifecycle observers Jul 5, 2023
@idelpivnitskiy idelpivnitskiy merged commit 2a114c0 into apple:main Jul 6, 2023
@idelpivnitskiy idelpivnitskiy deleted the logging-observers branch July 6, 2023 15:45
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.

2 participants