Commit d2ec7a5
committed
fix(spanner): fix flakiness in testCreateSessionDeadlineExceeded
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 1431e11 commit d2ec7a5
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