Commit 2fbb6fb
committed
Fix JdbcLockRegDiffClientTests race condition
https://build.spring.io/browse/INT-MJATS41-1242
When different `DefaultLockRepository` instances use the same client id,
there is a possibility that they will update the same row in the table.
This way we have a chance that not only one obtains a lock and try to
add a value to the collection.
* Remove the test-case for the same client id as non-stable and even
dangerous by the the distributed lock purpose
* Use `tryLock(Long.MAX_VALUE)` to really ensure the wait behavior
during the concurrent loop
* Use `20` for thread pool to align with the tasks amount
**Cherry-picked to 4.3.x**1 parent c48a239 commit 2fbb6fb
File tree
1 file changed
+6
-13
lines changed- spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/lock
1 file changed
+6
-13
lines changedLines changed: 6 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | 194 | | |
200 | 195 | | |
201 | 196 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
209 | 200 | | |
210 | 201 | | |
| 202 | + | |
| 203 | + | |
211 | 204 | | |
212 | 205 | | |
213 | | - | |
| 206 | + | |
214 | 207 | | |
215 | 208 | | |
216 | 209 | | |
| |||
0 commit comments