Commit 93f21ed
authored
fix(spanner): fix flakiness in testCreateSessionDeadlineExceeded (#12944)
The test `testCreateSessionDeadlineExceeded` in
`MultiplexedSessionDatabaseClientMockServerTest` was flaky because it
used a non-sticky exception for simulated `DEADLINE_EXCEEDED` on
`CreateSession`. This exception could be consumed by background session
creation tasks before the test could verify it.
This change uses `ofStickyException` to ensure the exception persists
until explicitly cleared by `mockSpanner.removeAllExecutionTimes()`,
making the test robust against concurrent background activity.
Fixes: #128901 parent 79480e0 commit 93f21ed
1 file changed
Lines changed: 1 addition & 1 deletion
File tree
- java-spanner/google-cloud-spanner/src/test/java/com/google/cloud/spanner
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
0 commit comments