[
https://issues.apache.org/jira/browse/THRIFT-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14261158#comment-14261158
]
ASF GitHub Bot commented on THRIFT-2886:
----------------------------------------
GitHub user Jens-G opened a pull request:
https://github.com/apache/thrift/pull/341
THRIFT-2886 Integrate binary type in standard Thrift cross test
For reasons of better maintainability, this PR consists of 5 commits:
- adding testBinary to the ThriftTest.thrift IDL file
- adding full testBinary() support to Delphi
- adding full testBinary() support to C#
- adding full testBinary() support to Haxe
- adding **partial** testBinary() support to:
- C_glib
- C++
- D
- Erlang
- Go
- Haskell
- Lua
- Java/Me
- JavaScript
- Node
- Ocaml
- Perl
- PHP
- Python
- Ruby
The latter are minimal, server-side implementations only to just satisfy
`make check`. There have been a number of TODOs added to the sources, these
should be solved by subsequent tickets.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Jens-G/thrift thrift-2886-testBinary
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/341.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #341
----
commit 0d1adeca528f3644162ad56451db8f0873f09641
Author: Jens Geyer <[email protected]>
Date: 2014-12-13T22:39:45Z
THRIFT-2886 Integrate binary type in standard Thrift cross test
Client: Tests
Patch: Jens Geyer
commit da1d3461f2124031f638d1848f0a536f8cc4a585
Author: Jens Geyer <[email protected]>
Date: 2014-12-13T22:40:35Z
THRIFT-2886 Integrate binary type in standard Thrift cross test
Client: C#
Patch: Jens Geyer
commit 2c7e4f423f39f11a46a572dd70082992f8a30030
Author: Jens Geyer <[email protected]>
Date: 2014-12-13T22:42:58Z
THRIFT-2886 Integrate binary type in standard Thrift cross test
Client: Delphi
Patch: Jens Geyer
commit e2142a4cb867fb5ef8db4f90ed9f129707fa9bd7
Author: Jens Geyer <[email protected]>
Date: 2014-12-13T23:29:17Z
THRIFT-2886 Integrate binary type in standard Thrift cross test
Client: Haxe
Patch: Jens Geyer
commit 1886873e376b2dcd8b1c24fb3fd0eb2dc47f0c69
Author: Jens Geyer <[email protected]>
Date: 2014-12-14T02:14:26Z
THRIFT-2886 Integrate binary type in standard Thrift cross test
Client: C_glib, C++, D, Erlang, Go, Haskell, Lua, Java/Me, JavaScript,
Node, Ocaml, Perl, PHP, Python, Ruby
Patch: Jens Geyer
Minimal server-side implementations and TODO stubs for various languages to
let "make check" succeeed.
Not contained in this patch and still TODO:
- client side implementations, i.e. calls to testBinary() and appropriate
tests
- server side hex printout missing for some languages
----
> Integrate binary type in standard Thrift cross test
> ---------------------------------------------------
>
> Key: THRIFT-2886
> URL: https://issues.apache.org/jira/browse/THRIFT-2886
> Project: Thrift
> Issue Type: Sub-task
> Components: Test Suite
> Reporter: Jens Geyer
>
> I propose to complete the half-hearted try to integrate the {{binary}} type
> into the test suite. We actually have a {{CrazyNesting}} struct defined, yet
> that structure is not used in any call. So we do test the code generation
> vis-á-vis compileability, but we do not test whether or not the
> impleemntation actually works.
> Background info:
> http://stackoverflow.com/questions/27408710/python-thrift-binary-type-requires-encoding
> *Spec proposal:*
> {code}
> /**
> * Prints 'testBinary("%s")' where '%s' is a hex-formatted string of
> thing's data
> * @param binary thing - the binary data to print
> * @return binary - returns the binary 'thing'
> */
> binary testBinary(1: binary thing),
> {code}
> *Test case proposal:*
> The client sends a binary containing all 256 bytes (in arbitrary order) to
> the server and checks the returned binary data against the value sent to the
> server. If they do match exactly, the test counts as passed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)