kpumuk opened a new pull request, #3247:
URL: https://github.com/apache/thrift/pull/3247
This merge request addresses the following test failures:
```
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)>'
```
From the [Rack
documentation](https://rack.github.io/rack/2.2/Rack/Response.html),
> Your application’s call should end returning
[Response#finish](https://rack.github.io/rack/2.2/Rack/Response.html#method-i-finish).
Additionally:
* using identity checks on integers produces weird expectation "expected
#<Integer:809> => 404", which is not necessary. Switched to using `eq` matcher
* `be_truthy` matcher is overly generic and identity matching on
`true`/`false` is preferred: "expected true" output will be displayed on failure
<!-- We recommend you review the checklist/tips before submitting a pull
request. -->
- [ ] Did you create an [Apache
Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket?
([Request account here](https://selfserve.apache.org/jira-account.html), not
required for trivial changes)
- [ ] If a ticket exists: Does your pull request title follow the pattern
"THRIFT-NNNN: describe my issue"?
- [x] Did you squash your changes to a single commit? (not required, but
preferred)
- [x] Did you do your best to avoid breaking changes? If one was needed,
did you label the Jira ticket with "Breaking-Change"?
- [ ] If your change does not involve any code, include `[skip ci]` anywhere
in the commit message to free up build resources.
<!--
The Contributing Guide at:
https://github.com/apache/thrift/blob/master/CONTRIBUTING.md
has more details and tips for committing properly.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]