Commit 4f2b110
authored
s2a: Improve S2AStubTest clarity and performance (#12618)
Refactors S2AStubTest to address issues in #12581:
- Rename `send_receiveOkStatus` to test successful responses using
FakeWriter
- Add `send_withUnavailableService_throwsDeadlineExceeded` with 1-second
deadline for timeout testing
- as is
<img width="484" height="351" alt="image2"
src="https://github.com/user-attachments/assets/24320f43-32fe-4305-9daf-29d2570ecaf1"
/>
- to be
<img width="596" height="404" alt="image"
src="https://github.com/user-attachments/assets/6f8b9c4c-ca6c-46ae-8e99-d405a504308e"
/>
Reduces test execution time from 20 seconds to 1 second while clarifying
test intent.1 parent 1be6815 commit 4f2b110
File tree
2 files changed
+39
-10
lines changed- s2a/src
- main/java/io/grpc/s2a/internal/handshaker
- test/java/io/grpc/s2a/internal/handshaker
2 files changed
+39
-10
lines changedLines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
56 | 65 | | |
57 | 66 | | |
58 | 67 | | |
| |||
63 | 72 | | |
64 | 73 | | |
65 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
66 | 80 | | |
67 | 81 | | |
68 | 82 | | |
| |||
154 | 168 | | |
155 | 169 | | |
156 | 170 | | |
157 | | - | |
| 171 | + | |
158 | 172 | | |
159 | 173 | | |
160 | 174 | | |
| |||
Lines changed: 24 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
70 | 70 | | |
71 | | - | |
72 | | - | |
| 71 | + | |
73 | 72 | | |
74 | | - | |
| 73 | + | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
236 | 251 | | |
237 | 252 | | |
238 | 253 | | |
| |||
0 commit comments