Commit eb8e214
committed
Stabilize concurrent binding creation test
The test for concurrent service credential binding creation used threads, which caused sporadic failures in other tests due to database connection interference.
This commit rewrites the test to use a spy instead of threads.
The spy simulates the race condition by creating a conflicting binding after the database lock is acquired, verifying the code's locking mechanism without the side effects of multi-threading.1 parent 8e92607 commit eb8e214
File tree
1 file changed
+11
-12
lines changed- spec/unit/actions
1 file changed
+11
-12
lines changedLines changed: 11 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | 237 | | |
245 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
246 | 248 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
| 249 | + | |
251 | 250 | | |
252 | 251 | | |
253 | 252 | | |
| |||
0 commit comments