mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
e0e8316838
Client: cpp Patch: Dave Watson Github Pull Request: This closes #84 ---- commit b6134cedf292845e5ed01052919894df6b561bf2 Date: 2014-03-20T18:12:04Z Recursive structs support in parser A common complaint is that you can't express trees or other recursive structures in thrift easily - unlike protobufs. This diff loosens up the parser to allow using structs before they are defined (and uses typedef as a forward declaration). This diff is actually enough to make recursive types work for some dyamic languages (I tried php, works out of the box!) Other languages will need forward declarations, or ways to box types, to make this work (i.e. C++ needs both forward decls and a way to express structs as pointers) |
||
---|---|---|
.. | ||
cpp | ||
hs | ||
keys | ||
lua | ||
ocaml | ||
perl | ||
php | ||
py | ||
py.tornado | ||
py.twisted | ||
rb | ||
threads | ||
AnnotationTest.thrift | ||
BrokenConstants.thrift | ||
ConstantsDemo.thrift | ||
DebugProtoTest.thrift | ||
DenseLinkingTest.thrift | ||
DocTest.thrift | ||
FastbinaryTest.py | ||
Include.thrift | ||
JavaBeansTest.thrift | ||
Makefile.am | ||
ManyOptionals.thrift | ||
ManyTypedefs.thrift | ||
OptionalRequiredTest.thrift | ||
README.md | ||
Recursive.thrift | ||
ReuseObjects.thrift | ||
SmallTest.thrift | ||
StressTest.thrift | ||
test.sh | ||
ThriftTest.thrift |
Apache Thrift - integration test suite
This is the cross everything integration test suite for Apache Thrift. executed by
make cross
at the moment, this starts the test.sh script which does the real cross test with different transports, protocols and languages.
Unit tests for languages ar usually located under lib//test/ cross language tests acording to ThriftTest.thrift shall be provided for every language including executables with the following command line interface for servers:
$ ./cpp/TestServer -h
Allowed options:
-h [ --help ] produce help message
--port arg (=9090) Port number to listen
--domain-socket arg Unix Domain Socket (e.g. /tmp/ThriftTest.thrift)
--server-type arg (=simple) type of server, "simple", "thread-pool",
"threaded", or "nonblocking"
--transport arg (=buffered) transport: buffered, framed, http
--protocol arg (=binary) protocol: binary, compact, json
--ssl Encrypted Transport using SSL
--processor-events processor-events
-n [ --workers ] arg (=4) Number of thread pools workers. Only valid for
thread-pool server type
and this for clients:
$ ./cpp/TestClient -h
Allowed options:
-h [ --help ] produce help message
--host arg (=localhost) Host to connect
--port arg (=9090) Port number to connect
--domain-socket arg Domain Socket (e.g. /tmp/ThriftTest.thrift),
instead of host and port
--transport arg (=buffered) Transport: buffered, framed, http, evhttp
--protocol arg (=binary) Protocol: binary, compact, json
--ssl Encrypted Transport using SSL
-n [ --testloops ] arg (=1) Number of Tests
If you have executed the make check or make cross then you will be able to browse gen-html/ThriftTest.html with the test documentation.
SSL
Test Keys and Certificates are provided in multiple formats under the following directory
test/keys