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
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
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
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
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
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
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
Summary: libthriftnb is the one that requires libevent. It was really annoying that you always had to put -levent in your link step to build thrift programs when youa re not using any of the c++ nonblocking stuff. This way, if you're using nonblocking you can do that, but the normal case is easier to link.
Reviewed By: makefile
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664951 13f79535-47bb-0310-9956-ffa450edef68
Summary:
-- TBufferedFileWriter.h/cpp will be renamed to TFileTransport.h/cpp in the next commit.
-- TFileTransport is essentially reading and writing thrift calls to/from a file instead of a
socket.
-- The code/design is somewhat similar to pillar_logfile but there are some significant changes.
todo:
-- still need to do error correction/detection
Reviewed By: Mark Slee
Test Plan:
-- Wrote test in thrift/test/cpp/src/main.cpp that appends to a file and replays requests
Notes:
It's finally time to port search over to Thrift
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664889 13f79535-47bb-0310-9956-ffa450edef68
Summary:
-- Modified StressTest.thrift to work (it was out of date..) and added tests for TBufferedFileWriter
-- Modified Makefiles to use the correct lib directory
Reviewed By: Slee
Test Plan: This is the test.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664827 13f79535-47bb-0310-9956-ffa450edef68
Summary: Servers need to create bufferedtransports etc. around the transports they get in a user-definable way. So use a factory pattern to allow the user to supply an object to the server that defines this behavior.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664792 13f79535-47bb-0310-9956-ffa450edef68
Summary:
-- this should fix the library mismatch issue..
From the gcc linking guide:
LIBRARY_PATH
The value of LIBRARY_PATH is a colon-separated list of directories,
much like PATH. When configured as a native compiler, GCC tries
the directories thus specified when searching for special linker
files, if it can't find them using GCC_EXEC_PREFIX. Linking using
GCC also uses these directories when searching for ordinary
libraries for the -l option (but directories specified with -L come
first).
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664790 13f79535-47bb-0310-9956-ffa450edef68
Summary: Just for completeness cause I'm crazy. Let's never use these!
Notes: Also made thrift grammar support # style comments, so you can do this at the top of your files
#!/usr/local/bin/thrift --cpp
/**
* This is a thrift def file youc an invoke directly and gen code!
*/
blah
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664789 13f79535-47bb-0310-9956-ffa450edef68
Summary:
-- dont use /usr/local as the thrift directory now that multiple ppl are developing on dev007
Reviewed By: McSlee
Test Plan: Tested by making and cleaning
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664786 13f79535-47bb-0310-9956-ffa450edef68
Summary: Generate classes instead of structs, and put read/write methods inside the class definition. Separate services into uniquely generated files. Separate types header file from types implementation file (read/write methods)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664777 13f79535-47bb-0310-9956-ffa450edef68
Modified TProtocol.h et al to take collection size as unsigned int. This removes need to cast STL's default size_t to signed int and is more correct, since collection sizes cannot be < 0 by definition
Moved compiler/Makefile to compiler/cpp.mk so it doesn't get trashed by automake
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664766 13f79535-47bb-0310-9956-ffa450edef68
Summary: End to end communication working in Thrift with PHP
Problem: It's a bit slower than pillar still. Need to find out why.
Reviewed By: aditya
Test Plan: Unit tests are in the test directory. Get lucas on the PHP case...
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664720 13f79535-47bb-0310-9956-ffa450edef68
Summary: Did I promise you this or what?! Interoperable test servers and clients in both C++ and Java that you can use to check that they all work, all perform well, and that they all actually talk to each other!
Problem: How we gon' test this Thrift bizniss?
Solution: Write some test scenarios in each language.
Reviewed By: aditya
Test Plan: This IS the test plan.
Notes: These tools are actually pretty easy to use, so long as you remember to type 'ant' in the java directory instead of 'make'.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664716 13f79535-47bb-0310-9956-ffa450edef68
Summary: End-to-end communications and serialization in C++ is working
Reviewed By: aditya
Test Plan: See the new top-level test/ folder. It vaguely resembles a unit test, though it could be more automated.
Revert Plan: Revertible
Notes: Still a LOT of optimization work to be done on the generated C++ code, which should be using dynamic memory in a number of places. Next major task is writing the PHP/Java/Python generators.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664712 13f79535-47bb-0310-9956-ffa450edef68