New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpMessageController is not thread-safe #353

Closed
imezhenkov opened this Issue Mar 21, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@imezhenkov
Contributor

imezhenkov commented Mar 21, 2018

Hi Christoph,

During the investigation of the instability of our functional tests I found that Citrus' http server sometimes returns wrong responses for concurrent requests. After digging deeper I revealed that the cause of problem lies in not thread-safe handing of response in HttpMessageController. There is a field responseCache which was introduced for message tracing reasons but which is also used to return response entity.
Possible solution here is to use local variable for return instead of the field and set responseCache from the variable.
Please find in the attachments the test to reproduces the issue.
Tested on version 2.7.3.

http_controller_test.zip

image

imezhenkov added a commit to imezhenkov/citrus that referenced this issue Mar 21, 2018

Update HttpMessageController.java
The change fixes issue `HttpMessageController is not thread-safe citrusframework#353`

@christophd christophd added this to the v2.7.5 milestone Mar 23, 2018

@christophd

This comment has been minimized.

Member

christophd commented Apr 11, 2018

Fixed thanks to #354

@christophd christophd closed this Apr 11, 2018

@christophd christophd removed the READY label Apr 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment