-
Hi, first of all I thank contributors to this library which simplifies a lot my test scenarios, I really like the fluent interface approach for this use case. I recently updated httpexpect from v2.3.1 to v2.8.0 and noticed that tests were crashing due to data races ( I run tests with I could identify that #150 , which was merged in v2.5.0, introduced this change: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi! Thanks for report and digging into the problem. httpexpect is not thread safe. If it was thread-safe in earlier releases, it was by accident. However, I had thoughts on making top-level components thread-safe and documenting that (including Expect instance). Ideally I'd make the lib thread-safe completely, but I'm not sure if making Request thread-safe would be easy: it can invoke user callbacks which may in turn directly or indirectly invoke methods of Request (because why not) and it can lead to hard-to-catch deadlocks. I'll take a look of making |
Beta Was this translation helpful? Give feedback.
Hi! Thanks for report and digging into the problem.
httpexpect is not thread safe. If it was thread-safe in earlier releases, it was by accident.
However, I had thoughts on making top-level components thread-safe and documenting that (including Expect instance).
Ideally I'd make the lib thread-safe completely, but I'm not sure if making Request thread-safe would be easy: it can invoke user callbacks which may in turn directly or indirectly invoke methods of Request (because why not) and it can lead to hard-to-catch deadlocks.
I'll take a look of making
chain
thread-safe in upcoming days, this should be the very first step towards this direction because most components are based on it. The…