Hi all,
I am trying to run thrift cross language test suite by running test/test.sh.
For each cases where 'http' is the transport type, I am getting build
failure (output log files for server and client has been attached).
I tried to run server and client alone with out running whole test suite.
Following is the result I got.
Server - chamila@chamila-Dell-System-Vostro-3450:~/GSoC/thrift/test$
cpp/TestServer --protocol=binary --transport=http
Starting "simple" server (http/binary) listen on: 9090
testVoid()
testString("Test")
testByte(1)
testI32(-1)
testI64(-34359738368)
testDouble(-5.325098)
testStruct({"Zero", 1, -3, -5})
testNest({1, {"Zero", 1, -3, -5}, 5})
testMap({0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6})
testSet({-2, -1, 0, 1, 2})
testList({-2, -1, 0, 1, 2})
testEnum(1)
testEnum(2)
testEnum(3)
testEnum(5)
testEnum(8)
testTypedef(309858235082523)
testMapMap(1)
testInsanity()
return = {1 => {2 => {{5 => 5, 8 => 8, }, {{"Goodbye4", 4, 4, 4},
{"Hello2", 2, 2, 2}, }}, 3 => {{5 => 5, 8 => 8, }, {{"Goodbye4", 4, 4, 4},
{"Hello2", 2, 2, 2}, }}, }, 2 => {6 => {{}, {}}, }, }
testException(Xception)
testException(TException)
testException(success)
testMultiException(Xception, test 1)
testMultiException(Xception2, test 2)
testMultiException(success, test 3)
testOneway(3): Sleeping...
testOneway(3): done sleeping!
Client -
testclient:
[java] Test #1, connect localhost:9090
[java] testVoid() = void
[java] testString("Test") = "Test"
[java] testByte(1) = 1
[java] testI32(-1) = -1
[java] testI64(-34359738368) = -34359738368
[java] testDouble(-5.325098235) = -5.325098235
[java] testStruct({"Zero", 1, -3, -5}) = {"Zero",1, -3, -5}
[java] testNest({1, {"Zero", 1, -3, -5}), 5} = {1, {"Zero", 1, -3,
-5}, 5}
[java] testMap({0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6}) = {0 =>
-10, 1 => -9, 2 => -8, 3 => -7, 4 => -6}
[java] testSet({0, 1, 2, -2, -1}) = {0, 1, 2, -2, -1}
[java] testList({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2}
[java] testEnum(ONE) = ONE
[java] testEnum(TWO) = TWO
[java] testEnum(THREE) = THREE
[java] testEnum(FIVE) = FIVE
[java] testEnum(EIGHT) = EIGHT
[java] testTypedef(309858235082523) = 309858235082523
[java] testMapMap(1) = {4 => {1 => 1, 2 => 2, 3 => 3, 4 => 4, }, -4 =>
{-4 => -4, -3 => -3, -2 => -2, -1 => -1, }, }
[java] testInsanity() = {1 => {THREE => {{FIVE => 5, EIGHT => 8, },
{{"Goodbye4", 4, 4, 4}, {"Hello2", 2, 2, 2}, }}, TWO => {{FIVE => 5, EIGHT
=> 8, }, {{"Goodbye4", 4, 4, 4}, {"Hello2", 2, 2, 2}, }}, }, 2 => {SIX =>
{{}, {}}, }, }
[java] testClient.testException("Xception") => {1001, "Xception"}
[java] testClient.testException("TException") => {"Default
TException."}
[java] testClient.testException("success") => void
[java] testClient.testMultiException("Xception", "test 1") => {1001,
"This is an Xception"}
[java] testClient.testMultiException("Xception2", "test 2") => {2002,
{"This is an Xception2"}}
[java] testClient.testMultiException("success", "test 3") => {{"test
3"}}
It seems like server is sleeping in the 'testOneWay' test case and so that
client does not get any result.
What is the reason for this? how can I slove this?
Thank You!
--
*Chamila Dilshan Wijayarathna,*
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.
Buildfile: /home/chamila/GSoC/thrift/lib/java/build.xml
optional-generate:
setup.init:
mvn.ant.tasks.check:
proxy:
mvn.ant.tasks.download:
[get] Getting: http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
[get] To: /home/chamila/GSoC/thrift/lib/java/build/tools/maven-ant-tasks-2.1.3.jar
[get] Not modified - so not downloaded
mvn.init:
[artifact:dependencies] [WARNING] Overriding profile: 'maven-ant-tasks-repo-profile' (source: pom) with new instance from source: pom
init:
compile:
dist:
compile-test:
testclient:
[java] Test #1, connect localhost:9090
[java] testVoid() = void
[java] testString("Test") = "Test"
[java] testByte(1) = 1
[java] testI32(-1) = -1
[java] testI64(-34359738368) = -34359738368
[java] testDouble(-5.325098235) = -5.325098235
[java] testStruct({"Zero", 1, -3, -5}) = {"Zero",1, -3, -5}
[java] testNest({1, {"Zero", 1, -3, -5}), 5} = {1, {"Zero", 1, -3, -5}, 5}
[java] testMap({0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6}) = {0 => -10, 1 => -9, 2 => -8, 3 => -7, 4 => -6}
[java] testSet({0, 1, 2, -2, -1}) = {0, 1, 2, -2, -1}
[java] testList({-2, -1, 0, 1, 2}) = {-2, -1, 0, 1, 2}
[java] testEnum(ONE) = ONE
[java] testEnum(TWO) = TWO
[java] testEnum(THREE) = THREE
[java] testEnum(FIVE) = FIVE
[java] testEnum(EIGHT) = EIGHT
[java] testTypedef(309858235082523) = 309858235082523
[java] testMapMap(1) = {4 => {1 => 1, 2 => 2, 3 => 3, 4 => 4, }, -4 => {-4 => -4, -3 => -3, -2 => -2, -1 => -1, }, }
[java] testInsanity() = {1 => {TWO => {{FIVE => 5, EIGHT => 8, }, {{"Goodbye4", 4, 4, 4}, {"Hello2", 2, 2, 2}, }}, THREE => {{FIVE => 5, EIGHT => 8, }, {{"Goodbye4", 4, 4, 4}, {"Hello2", 2, 2, 2}, }}, }, 2 => {SIX => {{}, {}}, }, }
[java] testClient.testException("Xception") => {1001, "Xception"}
[java] testClient.testException("TException") => {"Default TException."}
[java] testClient.testException("success") => void
[java] testClient.testMultiException("Xception", "test 1") => {1001, "This is an Xception"}
[java] testClient.testMultiException("Xception2", "test 2") => {2002, {"This is an Xception2"}}
[java] testClient.testMultiException("success", "test 3") => {{"test 3"}}
[java] testOneway(3)...org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
[java] at org.apache.thrift.transport.THttpClient.flush(THttpClient.java:356)
[java] at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:65)
[java] at thrift.test.ThriftTest$Client.send_testOneway(ThriftTest.java:767)
[java] at thrift.test.ThriftTest$Client.testOneway(ThriftTest.java:760)
[java] at org.apache.thrift.test.TestClient.main(TestClient.java:597)
[java] Caused by: java.net.ConnectException: Connection refused
[java] at java.net.PlainSocketImpl.socketConnect(Native Method)
[java] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
[java] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
[java] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
[java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
[java] at java.net.Socket.connect(Socket.java:579)
[java] at java.net.Socket.connect(Socket.java:528)
[java] at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
[java] at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)
[java] at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
[java] at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:709)
[java] at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)
[java] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1322)
[java] at java.net.HttpURLConnection.getResponseMin time: 0us
[java] Max time: 0us
[java] Avg time: 0us
[java] Code(HttpURLConnection.java:468)
[java] at org.apache.thrift.transport.THttpClient.flush(THttpClient.java:347)
[java] ... 4 more
[java]
[java] For good meausre here is some JSON:
[java] {"userMap":{"5":5000},"xtructs":[{"string_thing":"Truck","byte_thing":8,"i32_thing":8,"i64_thing":8}]}
BUILD FAILED
/home/chamila/GSoC/thrift/lib/java/build.xml:217: Java returned: 1
Total time: 15 seconds
Starting "simple" server (http/binary) listen on: 9090