Commit Graph

87 Commits

Author SHA1 Message Date
Roger Meier
c095919087 THRIFT-1829 cpp unit tests fail to build using multiple make jobs
Patch: David Rennalls and Roger Meier
2013-01-15 23:20:19 +01:00
Jake Farrell
970c86a5f2 Thrift-1607:Incorrect file modes for several source files
Client: build
Patch: Andrew Cox

File modes of some non-script text files (e.g. .xml, .java, .cc) in the source tree include execute permissions (because these files have the svn:executable property).



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1339492 13f79535-47bb-0310-9956-ffa450edef68
2012-05-17 05:41:09 +00:00
Roger Meier
4fce960b7f THRIFT-1592 Test clients should have a return codes that reflect whether they succeeded or not
Patch: Nathaniel Cook

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1333765 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 06:22:09 +00:00
Roger Meier
99b3672530 THRIFT-1588 Java Generated Exceptions don't follow inheritance pattern as other Languages
- fix the build!
- add test/gen-html for ThriftTest.thrift

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1333628 13f79535-47bb-0310-9956-ffa450edef68
2012-05-03 21:21:43 +00:00
Roger Meier
1f8b48f5bd THRIFT-1590 Document the excepted return values and behaviors ThriftTest.thrift so that all languages can implement a test server
Patch: Nathaniel Cook

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1333243 13f79535-47bb-0310-9956-ffa450edef68
2012-05-02 22:56:47 +00:00
Roger Meier
f50df7f2ba THRIFT-1588 Java Generated Exceptions don't follow inheritance pattern as other Languages
Patch: Nathaniel Cook

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1333239 13f79535-47bb-0310-9956-ffa450edef68
2012-05-02 22:49:55 +00:00
Roger Meier
33eaa0f100 THRIFT-1552 Thrift (cpp) include files shouldn't require adding "thrift" to the compilers include path.
roger: some additional fixes

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1325677 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 09:13:13 +00:00
Roger Meier
49ff8b123a THRIFT-1552 Include paths for c/c++ should be prefixed with 'thrift/'
To ensure there are no include path collisions the C and C++ header
include paths should include 'thrift' as the root leaf. This will
prevent having to place /usr/include/thrift into the compilers include
header search path, which might otherwise result in the compiler
accidentally picking up headers that it shouldn't.

e.g. #include <foo/bar.h> should be #include <thrift/foo/bar.h>

Change-Id: I48f2b0f549bda0fc81e85506ac857adc800b98a1

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1325674 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 09:12:31 +00:00
Jake Farrell
ea949fbaf9 Thrift-1462: add more strict compiler flags
Reverting patch due to it breaking compilers older than 4.4 (os x, centos 5.x, etc)



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213901 13f79535-47bb-0310-9956-ffa450edef68
2011-12-13 20:02:33 +00:00
Roger Meier
ca10fd4a51 THRIFT-1462 add more strict compiler flags(-Wall -Wextra -std=c++0x -pedantic)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213459 13f79535-47bb-0310-9956-ffa450edef68
2011-12-12 22:00:23 +00:00
Roger Meier
611f90cf9e THRIFT-1459 declare shared_ptr as boost::shared_ptr
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1213090 13f79535-47bb-0310-9956-ffa450edef68
2011-12-11 22:08:51 +00:00
Roger Meier
5b1e3c7bf1 return 1 if transport open fails
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1211868 13f79535-47bb-0310-9956-ffa450edef68
2011-12-08 13:20:12 +00:00
Roger Meier
3faaedf46b THRIFT-1361 Optional replacement of pthread by boost::thread
Patch: alexandre parenteau

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1178176 13f79535-47bb-0310-9956-ffa450edef68
2011-10-02 10:51:45 +00:00
Roger Meier
a8cef6e55b THRIFT-916 gcc warnings in c++ header files
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1147700 13f79535-47bb-0310-9956-ffa450edef68
2011-07-17 18:55:59 +00:00
Roger Meier
7e056e7572 THRIFT-1222 Unhandled exception for TEvhttpServer request
Patch: Alexandre Parenteau

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1147542 13f79535-47bb-0310-9956-ffa450edef68
2011-07-17 07:28:28 +00:00
Roger Meier
d3b9dca285 THRIFT-457 test/cpp makefiles do not honor --prefix configuration setting
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1139309 13f79535-47bb-0310-9956-ffa450edef68
2011-06-24 14:01:10 +00:00
Roger Meier
ca142b0bc8 THRIFT-1198 C++ TestClient and Server Improvements (add Unix Domain Socket, HTTP, JSON)
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1133116 13f79535-47bb-0310-9956-ffa450edef68
2011-06-07 17:59:07 +00:00
Roger Meier
bb09f4442a THRIFT-1166 C++ tests in test/cpp broken
Patch: David Nadlinger, Roger Meier


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1129908 13f79535-47bb-0310-9956-ffa450edef68
2011-05-31 20:35:37 +00:00
Bryan Duxbury
cd9aea1136 THRIFT-151. cpp: TSSLServerSocket and TSSLSocket implementation
This patch adds an implementation of the above ssl sockets.

Patch: Ping Li, Kevin Worth, Rowan Kerr

git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1073441 13f79535-47bb-0310-9956-ffa450edef68
2011-02-22 18:12:06 +00:00
Roger Meier
5f9614cf9a THRIFT-916 long long becomes int64_t
Patch: Christian Lavoie



git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1037500 13f79535-47bb-0310-9956-ffa450edef68
2010-11-21 16:59:05 +00:00
David Reiss
2324871334 THRIFT-928. cpp: Thrift Server Client Stats
Add the ability for Thrift servers to monitor client connections.  It is
activated by #including server/TClientInfo.h and creating 1) a
TClientInfoCallHandler passed to the processor with setEventHandler()
and 2) a TClientInforServerHandler passed to the server with
setServerEventHandler().

The result vector, showing active connections, provides client address
and the thrift call it is executing (or last executed), the time
connected, and the number of calls made since connection.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005139 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:10:08 +00:00
David Reiss
b7762a032a THRIFT-922. cpp: Update C++ generator to emit templatized code
When the "templates" option is passed to the C++ generator, it now emits
templatized versions of the client and processor.  Generated types emit
templatized read() and write() functions.

This allows the generated code to invoke the correct non-virtual
TTransport and TProtocol implementations, resulting in faster
serialization and deserialization.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005138 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:10:00 +00:00
David Reiss
e71115be6c THRIFT-922. cpp: Templatize binary and compact protocol
Convert TBinaryProtocol and TCompactProtocol to template classes, taking
the transport class as a template parameter.  This allows them to make
non-virtual calls when using the template, improving serialization
performance.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005136 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:09:56 +00:00
David Reiss
ef7200f6e8 THRIFT-928. cpp: Include request/response size in processor callbacks
Required updating transport interface.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005129 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:09:42 +00:00
David Reiss
d7192063e1 THRIFT-928. cpp: Processor-level event callbacks
- Add a TProcessorEventHandler callback interface.
- Add methods to TProcessor to hold an instance of the interface.
- Add code to the compiler to make the processor call callbacks at key points.
- Add an optional processor event handler to the test server.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005126 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:09:33 +00:00
Bryan Duxbury
833ae49290 THRIFT-920. cpp: C++ Test and Tutorial does not compile anymore due to the change within Enum handling
Patch: Roger Meier and Christian Lavoie

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001826 13f79535-47bb-0310-9956-ffa450edef68
2010-09-27 17:26:02 +00:00
Bryan Duxbury
346a268931 THRIFT-456. cpp: Bad IP address string in test/cpp/src/main.cpp
This patch fixes a clear typo in main.cpp.

Patch: Rush Manbert

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@985772 13f79535-47bb-0310-9956-ffa450edef68
2010-08-15 23:04:12 +00:00
David Reiss
cf8c94acb4 THRIFT-426. cpp: Fix include path under test/cpp
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761763 13f79535-47bb-0310-9956-ffa450edef68
2009-04-03 19:07:19 +00:00
David Reiss
d0251dd852 cpp: Rename Makefiles under test/cpp
".mk" is the usual extension for makefiles not named
"GNUMakefile", "Makefile", or "makefile".  "Makefile.thrift"
should be a Thrift IDL file (think "Makefile.PL").


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761480 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 23:49:20 +00:00
David Reiss
356d570f36 cpp: Fix test server/client under test/cpp
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761479 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 23:49:18 +00:00
David Reiss
ea2cba8ba8 THRIFT-387. Add license headers to a bunch of files
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@760189 13f79535-47bb-0310-9956-ffa450edef68
2009-03-30 21:35:00 +00:00
David Reiss
6ce401dd55 THRIFT-136. s/async/oneway/ in misc places
This is mostly an internal-only change.
It affects docstrings, messages, variables, test cases, etc.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757992 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:01:58 +00:00
David Reiss
c51986f438 THRIFT-136. s/async/oneway/ in comments
This is an internal-only change.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@757990 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 20:01:25 +00:00
David Reiss
b139f64448 THRIFT-325. Remove a bunch of uses of the old command line format
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@745242 13f79535-47bb-0310-9956-ffa450edef68
2009-02-17 20:28:46 +00:00
T Jake Luciani
b5e6221eb5 THRIFT-270: change cpp namespaces from facebook::thrift to apache::thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739644 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 22:36:20 +00:00
David Reiss
9813cbeda6 cpp: Make the test server compatible with the Python test client
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@739629 13f79535-47bb-0310-9956-ffa450edef68
2009-01-31 21:39:11 +00:00
David Reiss
af78778acd (THRIFT-54) Remove "frameResponses" from TNonblockingServer
TNonblockingServer and TFramedTransport used to have the option to only
frame messages on one side of the communication.  This capability was
removed from TFramedTransport because it was poorly implemented and not
useful.  This change removes it from TNonblockingServer as well, and
removes references to it in some of the C++ test code.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@673791 13f79535-47bb-0310-9956-ffa450edef68
2008-07-03 20:29:34 +00:00
David Reiss
55ff70f8d6 Implement TApplicationException handling in alt_erl client
Summary:
  Throws a 'TApplicationException' record

Test plan:
  Changed cpp TestServer so that if testException is called with "ApplicationException" as an argument, it throws a TException which is serialized back as an EXCEPTION type message


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666421 13f79535-47bb-0310-9956-ffa450edef68
2008-06-11 00:58:25 +00:00
David Reiss
3000b5b1f1 Add an experiment to measure the likeliness that realloc will avoid a copy.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665625 13f79535-47bb-0310-9956-ffa450edef68
2008-03-31 21:38:29 +00:00
David Reiss
2845b52f47 Enhance C++ test client to make sure that async void is implemented properly
Summary:
Added another i32 test after the async test. If testAsync improperly
sends a response, then the i32 test will fail because the function
name won't match up, since it will be "off by one".

Test plan:
Tested cpp server and it works. Tested alterl server which
doesn't yet implement async void properly and verified failure


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665486 13f79535-47bb-0310-9956-ffa450edef68
2008-02-18 02:11:52 +00:00
David Reiss
2ab6fe88e2 Add testAsync to ThriftTest.thrift which verifies async void works properly.
Summary:
  - testAsync takes a number of seconds to sleep. The test client makes sure
    that the RPC returns in less than 0.2 seconds even though it asks the server
    to sleep for 3 seconds.
  - Implemented this test for C++ and Java.

Test Plan:
  - ran cpp TestServer and TestClient and verified functionality
  - tested cpp and java test server/client against each other - tests passed


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665484 13f79535-47bb-0310-9956-ffa450edef68
2008-02-18 02:11:44 +00:00
David Reiss
0c90f6f8af Thrift: Whitespace cleanup.
Summary:
- Expanded tabs to spaces where spaces were the norm.
- Deleted almost all trailing whitespace.
- Added newlines to the ends of a few files.
- Ran dos2unix on one file or two.

Reviewed By: mcslee

Test Plan: git diff -b

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665467 13f79535-47bb-0310-9956-ffa450edef68
2008-02-06 22:18:40 +00:00
David Reiss
4637990013 Thrift: Fix a bug in a test program.
Summary:
This didn't get updated when the class was renamed.

Reviewed By: mcslee

Test Plan: Trust Chad Walters.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665456 13f79535-47bb-0310-9956-ffa450edef68
2008-02-04 19:23:57 +00:00
David Reiss
832b262aca Thrift: Revamp build to use a single configure.ac.
Summary:
Ben Maurer suggested that it would make sense for Thrift to build as
a single project, with one configure.ac and multiple Makefile.am.
He was also kind enough to do the heavy lifting, and this commit
is the application of his patch (with minor modifications).
The most significant visible change from this diff is that
in order to buidl one of the thrift sub-projects (i.e.: the compiler,
the C++ library, or the Python library) you must run bootstrap.sh
and configure in the Thrift root, then make in the specific project.
Users who want to build and install the Python library but
can't run configure because they don't have Boost can simply
run setup.py directly.

Reviewed By: mcslee

Test Plan: Built Thrift from scratch.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665409 13f79535-47bb-0310-9956-ffa450edef68
2007-12-28 18:25:33 +00:00
Mark Slee
79b1694043 Refactor TNonblockingServer to use event_base construct
Summary: This allows the event loop to be shared across different components of a program of for a separate thread in a TNonblockingServer to safely use its own libevent code without conflicts.

Reviewed By: mcslee

Test Plan: Updated test/ committed here

Other Notes: submitted by Ben Maurer, patched in by mcslee with slight modifications


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665364 13f79535-47bb-0310-9956-ffa450edef68
2007-11-26 19:05:29 +00:00
David Reiss
bc3dddb91c Thrift: Better handling of strerror_r.
Summary:
Someone thought it would be a good idea to have two different signatures
for strerror_r, with subtly different semantics (strlcpy = smart).
We now work properly with either of them.

Also fixed a test to work on 32-bit, you sloppy <expletive>s.

Reviewed By: mcslee

Test Plan:
Rebuild thrift.
Force one of these errors to be thrown.

Revert Plan: ok


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665215 13f79535-47bb-0310-9956-ffa450edef68
2007-08-22 23:20:24 +00:00
Mark Slee
3e5d2d72b4 Whitespace fixes on test code
Reviewed By: thrift

Test Plan: Whitespace


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665136 13f79535-47bb-0310-9956-ffa450edef68
2007-06-15 01:45:56 +00:00
Mark Slee
e02385b0b4 Add thread pool option to NonblockingServer
Summary: If you want requests processed outside of the I/O thread

Reviewed By: jake luciani, aditya

Test Plan: nb-main.cpp, in the test folder


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665132 13f79535-47bb-0310-9956-ffa450edef68
2007-06-09 01:21:16 +00:00
Mark Slee
f4f18ec514 Need using namespace boost in thrift threads test
Reviewed By: jake luciani


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665119 13f79535-47bb-0310-9956-ffa450edef68
2007-05-16 21:22:34 +00:00
Mark Slee
0c2dff3f5a Fix broken C++ Thrift test
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665057 13f79535-47bb-0310-9956-ffa450edef68
2007-03-09 19:26:57 +00:00