File tree 3 files changed +10
-5
lines changed
3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 20
20
import static com .google .common .base .Preconditions .checkNotNull ;
21
21
import static com .google .common .base .Strings .isNullOrEmpty ;
22
22
23
+ import com .google .common .annotations .VisibleForTesting ;
23
24
import com .google .errorprone .annotations .CanIgnoreReturnValue ;
24
25
import io .grpc .Channel ;
25
26
import io .grpc .ChannelCredentials ;
@@ -110,7 +111,8 @@ public Builder setLocalUid(String localUid) {
110
111
* Sets the stub to use to communicate with S2A. This is only used for testing that the
111
112
* stream to S2A gets closed.
112
113
*/
113
- public Builder setStub (S2AStub stub ) {
114
+ @ VisibleForTesting
115
+ Builder setStub (S2AStub stub ) {
114
116
checkNotNull (stub );
115
117
this .stub = stub ;
116
118
return this ;
@@ -130,4 +132,4 @@ InternalProtocolNegotiator.ClientFactory buildProtocolNegotiatorFactory() {
130
132
}
131
133
132
134
private S2AChannelCredentials () {}
133
- }
135
+ }
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ public class S2AStub implements AutoCloseable {
44
44
private boolean doneWriting = false ;
45
45
private boolean isClosed = false ;
46
46
47
- static S2AStub newInstance (S2AServiceGrpc .S2AServiceStub serviceStub ) {
47
+ @ VisibleForTesting
48
+ public static S2AStub newInstance (S2AServiceGrpc .S2AServiceStub serviceStub ) {
48
49
checkNotNull (serviceStub );
49
50
return new S2AStub (serviceStub );
50
51
}
@@ -224,4 +225,4 @@ SessionResp getResultOrThrow() throws IOException {
224
225
return response .get ();
225
226
}
226
227
}
227
- }
228
+ }
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- package io .grpc .s2a . internal . handshaker ;
17
+ package io .grpc .s2a ;
18
18
19
19
import static com .google .common .truth .Truth .assertThat ;
20
20
import static java .util .concurrent .TimeUnit .SECONDS ;
37
37
import io .grpc .s2a .S2AChannelCredentials ;
38
38
import io .grpc .s2a .internal .channel .S2AHandshakerServiceChannel ;
39
39
import io .grpc .s2a .internal .handshaker .FakeS2AServer ;
40
+ import io .grpc .s2a .internal .handshaker .S2AServiceGrpc ;
41
+ import io .grpc .s2a .internal .handshaker .S2AStub ;
40
42
import io .grpc .stub .StreamObserver ;
41
43
import io .grpc .testing .protobuf .SimpleRequest ;
42
44
import io .grpc .testing .protobuf .SimpleResponse ;
You can’t perform that action at this time.
0 commit comments