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

core: Always pass offload executor to CallCredentials #9313

Merged
merged 1 commit into from Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -144,8 +144,7 @@ public Attributes getTransportAttrs() {
}
};
try {
creds.applyRequestMetadata(
requestInfo, firstNonNull(callOptions.getExecutor(), appExecutor), applier);
creds.applyRequestMetadata(requestInfo, appExecutor, applier);
} catch (Throwable t) {
applier.fail(Status.UNAUTHENTICATED
.withDescription("Credentials should use fail() instead of throwing exceptions")
Expand Down
Expand Up @@ -168,7 +168,7 @@ public void parameterPropagation_overrideByCallOptions() {

ArgumentCaptor<RequestInfo> infoCaptor = ArgumentCaptor.forClass(null);
verify(mockCreds).applyRequestMetadata(infoCaptor.capture(),
same(anotherExecutor), any(CallCredentials.MetadataApplier.class));
same(mockExecutor), any(CallCredentials.MetadataApplier.class));
RequestInfo info = infoCaptor.getValue();
assertSame(transportAttrs, info.getTransportAttrs());
assertSame(method, info.getMethodDescriptor());
Expand Down Expand Up @@ -212,7 +212,7 @@ public void parameterPropagation_callOptionsSetAuthority() {

ArgumentCaptor<RequestInfo> infoCaptor = ArgumentCaptor.forClass(null);
verify(mockCreds).applyRequestMetadata(
infoCaptor.capture(), same(anotherExecutor),
infoCaptor.capture(), same(mockExecutor),
any(io.grpc.CallCredentials.MetadataApplier.class));
RequestInfo info = infoCaptor.getValue();
assertSame(method, info.getMethodDescriptor());
Expand Down