No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
d333f32
... +1 ...
b051e68
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
22 | 22 | ||
23 | 23 | package com.uber.tchannel.handlers; |
|
24 | 24 | ||
25 | + | import com.google.common.annotations.VisibleForTesting; |
|
25 | 26 | import com.uber.tchannel.api.TChannel; |
|
26 | 27 | import com.uber.tchannel.api.errors.TChannelConnectionReset; |
|
27 | 28 | import com.uber.tchannel.channels.PeerManager; |
71 | 72 | this.maxPendingRequests = topChannel.getClientMaxPendingRequests(); |
|
72 | 73 | } |
|
73 | 74 | ||
75 | + | @VisibleForTesting |
|
76 | + | ResponseRouter(@NotNull TChannel topChannel, @NotNull PeerManager peerManager, @NotNull HashedWheelTimer timer) { |
|
77 | + | this.peerManager = peerManager; |
|
78 | + | this.resetOnTimeoutLimit = topChannel.getResetOnTimeoutLimit(); |
|
79 | + | this.timer = timer; |
|
80 | + | this.maxPendingRequests = topChannel.getClientMaxPendingRequests(); |
|
81 | + | } |
|
82 | + | ||
74 | 83 | @Override |
|
75 | 84 | public void channelActive(@NotNull ChannelHandlerContext ctx) throws Exception { |
|
76 | 85 | super.channelActive(ctx); |
183 | 192 | } |
|
184 | 193 | ||
185 | 194 | if (response != null) { |
|
195 | + | // Reset timeout counter if we receive a non-timeout response. |
|
196 | + | if (!(response.isError() && |
|
197 | + | ErrorType.Timeout.equals(((ErrorResponse) response).getErrorType()))) { |
|
198 | + | timeouts.set(0); |
|
199 | + | } |
|
186 | 200 | response.touch("ResponseRouter.handleResponse(...)"); |
|
187 | 201 | } |
|
188 | 202 |
Learn more Showing 4 files with coverage changes found.
tchannel-core/src/main/java/com/uber/tchannel/handlers/RequestRouter.java
tchannel-core/src/main/java/com/uber/tchannel/handlers/OutRequest.java
tchannel-core/src/main/java/com/uber/tchannel/api/SubChannel.java
tchannel-core/src/main/java/com/uber/tchannel/api/errors/TChannelNoPeerAvailable.java
Files | Complexity | Coverage |
---|---|---|
tchannel-core/src/main/java/com/uber/tchannel | ø | 0.70% 76.01% |
tchannel-hyperbahn/src/main/java/com/uber/tchannel/hyperbahn | 64.71% | 59.41% |
Project Totals (88 files) | 64.71% | 75.44% |
b051e68
06d0ccf
d333f32