Commit c07d9ba
ThreadingMock._increment_mock_call() was not thread-safe.
Multiple threads calling the mock simultaneously could lose
increments due to race conditions on call_count and other
attributes.
Fix by overriding _increment_mock_call in ThreadingMixin
and wrapping it with the existing _mock_calls_events_lock.
(cherry picked from commit 388e023)
Co-authored-by: saisneha196 <156835592+saisneha196@users.noreply.github.com>
1 parent 25092e8 commit c07d9ba
2 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3121 | 3121 | | |
3122 | 3122 | | |
3123 | 3123 | | |
| 3124 | + | |
| 3125 | + | |
| 3126 | + | |
| 3127 | + | |
3124 | 3128 | | |
3125 | 3129 | | |
3126 | 3130 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments