[
https://issues.apache.org/jira/browse/THRIFT-5907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmytro Shteflyuk resolved THRIFT-5907.
--------------------------------------
Resolution: Fixed
> Rack response needs to be finished when returned from the Rack application
> --------------------------------------------------------------------------
>
> Key: THRIFT-5907
> URL: https://issues.apache.org/jira/browse/THRIFT-5907
> Project: Thrift
> Issue Type: Bug
> Components: Ruby - Library
> Reporter: Dmytro Shteflyuk
> Assignee: Dmytro Shteflyuk
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The specs are breaking:
> {noformat}
> 1) Thrift::ThinHTTPServer::RackApplication 404 response receives a non-POST
> Failure/Error: expect(last_response.status).to be 404
> expected #<Integer:809> => 404
> got #<Integer:1001> => 500
> Compared using equal?, which compares object identity,
> but expected and actual are not the same object. Use
> `expect(actual).to eq(expected)` if you don't care about
> object identity in this example.
> # ./spec/thin_http_server_spec.rb:102:in 'block (3 levels) in <top
> (required)>'
> 2) Thrift::ThinHTTPServer::RackApplication 404 response receives a header
> other than application/x-thrift
> Failure/Error: expect(last_response.status).to be 404
> expected #<Integer:809> => 404
> got #<Integer:1001> => 500
> Compared using equal?, which compares object identity,
> but expected and actual are not the same object. Use
> `expect(actual).to eq(expected)` if you don't care about
> object identity in this example.
> # ./spec/thin_http_server_spec.rb:108:in 'block (3 levels) in <top
> (required)>'
> 3) Thrift::ThinHTTPServer::RackApplication 200 response status code 200
> Failure/Error: expect(last_response.ok?).to be_truthy
> expected: truthy value
> got: false
> # ./spec/thin_http_server_spec.rb:135:in 'block (3 levels) in <top
> (required)>'
> {noformat}
> From [Rack documentation|https://rack.github.io/rack/2.2/Rack/Response.html],
> "Your application's call should end returning Response#finish."
--
This message was sent by Atlassian Jira
(v8.20.10#820010)