Skip to content

Conversation

mateusazis
Copy link
Contributor

Initial attempt to use a real in-process service to reduce the mocking of ServerCall in preparation to run the tests in the internal Google infrastructure.


@Mock ServerCallHandler<Object, Object> next;
@Mock ServerCall<Object, Object> call;
@Mock ServerCall.Listener<Object> delegate;
@Captor ArgumentCaptor<Status> statusCaptor;

private final Metadata headers = new Metadata();
private final PendingAuthListener<Object, Object> listener = new PendingAuthListener<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if we can stop mocking ServerCall for the remaining untouched tests; I don't know how else we could enforce that the current methods are called in that order, specially the cancellation.

Copy link
Member

Choose a reason for hiding this comment

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

You assert the order of ClientCall.Listener callbacks.

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