Deprecate TestElement.setThreadContext
Open
enhancement
to-triage
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 5
Description
### Use case
`TestElement.setThreadContext` forces `TestElements` to be stateful, and it blocks reusing the same test element across threads.
### Possible solution
* Deprecate `TestElement.setThreadContext`: throw an exception if somebody attempts calling `setThreadContext` which is different from the current `ThreadContext`.
* make `getThreadContext` always delegate to `JMeterContextService.getContext()`
### Possible workarounds
_No response_
### JMeter Version
5.5
### Java Version
_No response_
### OS Version
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.