2010-10-27 12:30:11 +00:00
|
|
|
#include <assert.h>
|
|
|
|
#include <netdb.h>
|
|
|
|
|
|
|
|
#include "transport/thrift_server_transport.h"
|
|
|
|
#include "transport/thrift_server_socket.h"
|
|
|
|
|
|
|
|
static const char TEST_ADDRESS[] = "localhost";
|
|
|
|
static const int TEST_PORT = 64444;
|
|
|
|
|
|
|
|
static void
|
2010-11-26 10:17:48 +00:00
|
|
|
test_thrift_server (const int port)
|
2010-10-27 12:30:11 +00:00
|
|
|
{
|
|
|
|
ThriftServerSocket *tsocket = g_object_new (THRIFT_TYPE_SERVER_SOCKET,
|
2010-11-26 10:17:48 +00:00
|
|
|
"port", TEST_PORT, NULL);
|
2010-10-27 12:30:11 +00:00
|
|
|
|
|
|
|
g_object_unref (tsocket);
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2010-11-26 10:17:48 +00:00
|
|
|
main(int argc, char *argv[])
|
2010-10-27 12:30:11 +00:00
|
|
|
{
|
2010-11-26 10:17:48 +00:00
|
|
|
g_type_init();
|
|
|
|
g_test_init (&argc, &argv, NULL);
|
2010-10-27 12:30:11 +00:00
|
|
|
|
2010-11-26 10:17:48 +00:00
|
|
|
g_test_add_func ("/testthrift/Server", test_thrift_server);
|
|
|
|
|
|
|
|
return g_test_run ();
|
|
|
|
}
|