blob: edb22373dee84c02e233982fd77d908846f20bd5 [file] [log] [blame]
Roger Meier4d5157d2012-01-09 21:23:19 +00001#!/bin/sh
2#
3# Licensed to the Apache Software Foundation (ASF) under one
4# or more contributor license agreements. See the NOTICE file
5# distributed with this work for additional information
6# regarding copyright ownership. The ASF licenses this file
7# to you under the Apache License, Version 2.0 (the
8# "License"); you may not use this file except in compliance
9# with the License. You may obtain a copy of the License at
10#
11# http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing,
14# software distributed under the License is distributed on an
15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16# KIND, either express or implied. See the License for the
17# specific language governing permissions and limitations
18# under the License.
19#
20
21# Apache Thrift - integration test suite
22#
23# tests different client-server, protocol and transport combinations
24
25# related issues:
26# THRIFT-847 Test Framework harmonization across all languages
27# THRIFT-819 add Enumeration for protocol, transport and server types
28
Roger Meiercc0fe272014-05-16 23:18:25 +020029START_TIME=$SECONDS
henriqued17f1c92014-04-30 16:21:25 +020030cd "$( dirname "$0" )"
31BASEDIR=$(pwd)
32
Roger Meierbea27342014-08-08 00:30:50 +020033TESTCOUNT=0
34FAILED=0
35
Roger Meier4d5157d2012-01-09 21:23:19 +000036print_header() {
Roger Meier76150722014-05-31 22:22:07 +020037 printf "%-16s %-13s %-17s %-s\n" "client-server:" "protocol:" "transport:" "result:"
Roger Meier4d5157d2012-01-09 21:23:19 +000038}
39
Roger Meiercc0fe272014-05-16 23:18:25 +020040STATUS_HTML="status.html"
41
42print_html_header() {
43cat << EOF > $STATUS_HTML
44<!DOCTYPE HTML>
45<html>
46<head>
47<meta charset="utf-8">
48<title>Apache Thrift - integration test suite</title>
49<link rel="stylesheet" type="text/css" href="http://cdn.datatables.net/1.10.0/css/jquery.dataTables.css">
50<script type="text/javascript" charset="utf-8" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
51<script type="text/javascript" charset="utf-8" src="http://cdn.datatables.net/1.10.0/js/jquery.dataTables.js"></script>
52<script>
53 var test_data;
54 \$(document).ready( function () {
55 testTable = \$('#test_results').DataTable( {
56 data: test_data
57 });
58 \$('#test_results_filter label input')
59 .focus()
60 .val('failure');
61 });
62</script>
63</head>
64<body>
65<h2>Apache Thrift - integration test suite: Results</h2>
66<table id="test_results" class="display">
67 <thead>
68 <tr>
69 <th>Server</th>
70 <th>Client</th>
71 <th>Protocol</th>
72 <th>Transport</th>
73 <th>Result (log)</th>
74 </tr>
75 </thead>
76</table>
77<script>
78test_data = [
79EOF
80}
81
82print_html_footer() {
83duration=$1
84cat << EOF >> $STATUS_HTML
85]
86</script>
87<h2>Test Information</h2>
88<pre>
89Test Date: `date --iso-8601=seconds`
90Revision: `git rev-parse --short HEAD`
91OS: `uname -a`
92Test duration: $duration
93</pre>
94</body>
95</html>
96EOF
97}
98
Roger Meierf42ce2a2013-01-16 22:12:14 +010099intersection() {
100 return_value=""
101 for one in $1; do
102 for two in $2; do
103 if [ ${one} = ${two} ]; then
104 return_value=${return_value}" "${one}
105 fi
106 done;
107 done;
108 echo ${return_value};
109}
110
Roger Meier4d5157d2012-01-09 21:23:19 +0000111do_test () {
112 client_server=$1
113 protocol=$2
114 transport=$3
115 client_exec=$4
116 server_exec=$5
henriqued17f1c92014-04-30 16:21:25 +0200117 client_timeout=$6
118 server_startup_time=$7
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530119
Roger Meier4d5157d2012-01-09 21:23:19 +0000120 testname=${client_server}_${protocol}_${transport}
henriqued5aba4c2014-04-30 18:11:11 +0200121 server_timeout=$(echo "(${server_startup_time}+${client_timeout})" | bc)
Roger Meier76150722014-05-31 22:22:07 +0200122 printf "%-16s %-13s %-17s" ${client_server} ${protocol} ${transport}
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530123
Roger Meier284101c2014-03-11 21:20:35 +0100124 timeout $server_timeout $server_exec > log/${testname}_server.log 2>&1 &
henriqued17f1c92014-04-30 16:21:25 +0200125 server_pid=$!
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530126
Roger Meier4d5157d2012-01-09 21:23:19 +0000127 sleep $server_startup_time
henriqued17f1c92014-04-30 16:21:25 +0200128 timeout $client_timeout $client_exec > log/${testname}_client.log 2>&1
Ben Craigf41d79d2014-01-08 15:15:48 -0600129
Roger Meier4d5157d2012-01-09 21:23:19 +0000130 if [ "$?" -eq "0" ]; then
Roger Meiercc0fe272014-05-16 23:18:25 +0200131 result="success($?)"
132 echo " $result"
Roger Meier4d5157d2012-01-09 21:23:19 +0000133 else
Roger Meiercc0fe272014-05-16 23:18:25 +0200134 result="failure($?)"
135 echo " $result"
Roger Meier4edac7f2014-05-02 21:07:01 +0200136 # add details to the error.log
137 print_header >> log/error.log
138 printf "%-16s %-11s %-17s\n" ${client_server} ${protocol} ${transport} >> log/error.log
139 echo "=================== server message ===================" >> log/error.log
140 tail log/${testname}_server.log >> log/error.log
141 echo "=================== client message ===================" >> log/error.log
142 tail log/${testname}_client.log >> log/error.log
143 echo "======================================================" >> log/error.log
144 echo "" >> log/error.log
Roger Meierbea27342014-08-08 00:30:50 +0200145 FAILED=$(($FAILED + 1))
Roger Meier4d5157d2012-01-09 21:23:19 +0000146 fi
Roger Meierbea27342014-08-08 00:30:50 +0200147 TESTCOUNT=$(($TESTCOUNT + 1))
henriqued17f1c92014-04-30 16:21:25 +0200148
henriquead4df162014-05-20 13:18:45 +0200149 # split client-server string
150 client=${client_server%-*}
151 server=${client_server#*-}
Roger Meiercc0fe272014-05-16 23:18:25 +0200152
153 cat << EOF >> $STATUS_HTML
154 [
Roger Meiercc0fe272014-05-16 23:18:25 +0200155 "${server}",
Roger Meierc62798b2014-05-23 12:54:08 +0200156 "${client}",
Roger Meiercc0fe272014-05-16 23:18:25 +0200157 "${protocol}",
158 "${transport}",
159 "${result} (<a href=\"log/${testname}_client.log\">client</a>, <a href=\"log/${testname}_server.log\">server</a>)"
160 ],
161EOF
162
henriqued17f1c92014-04-30 16:21:25 +0200163 # silently kill server
164 kill ${server_pid} 2>/dev/null && wait ${server_pid} 2>/dev/null
Roger Meier4d5157d2012-01-09 21:23:19 +0000165}
166
167echo "Apache Thrift - integration test suite"
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530168if [ "$#" -eq "0" ]; then
169 THRIFT_TEST_PORT=9090
170else
171 THRIFT_TEST_PORT=$1
172fi
Roger Meier4d5157d2012-01-09 21:23:19 +0000173date
henriqued17f1c92014-04-30 16:21:25 +0200174
henriqued17f1c92014-04-30 16:21:25 +0200175
Roger Meier4d5157d2012-01-09 21:23:19 +0000176echo "======================================================"
177
178rm -rf log
179mkdir -p log
180
Roger Meiercc0fe272014-05-16 23:18:25 +0200181
Roger Meier4d5157d2012-01-09 21:23:19 +0000182print_header
Roger Meiercc0fe272014-05-16 23:18:25 +0200183print_html_header
184
185ant -f ../lib/java/build.xml compile-test 1>/dev/null
186
Roger Meier4d5157d2012-01-09 21:23:19 +0000187
Roger Meier82525772012-11-16 00:38:27 +0000188#TODO add enum for parameters
189#TODO align program arguments across languages
Roger Meier4d5157d2012-01-09 21:23:19 +0000190
Roger Meier023192f2014-02-12 09:35:12 +0100191cpp_protocols="binary compact json"
192java_protocols="binary compact json"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100193cpp_transports="buffered framed http"
194java_server_transports="buffered framed fastframed"
195java_client_transports=${java_server_transports}" http"
Roger Meier5829a2c2014-04-08 00:28:17 +0200196cpp_sockets="ip domain ip-ssl"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100197java_sockets="ip ip-ssl"
198# TODO fastframed java transport is another implementation of framed transport
Roger Meier4d5157d2012-01-09 21:23:19 +0000199
Roger Meierb3c84092014-09-01 21:53:40 +0200200c_glib_protocols="binary"
201c_glib_transports="buffered framed"
202c_glib_sockets="ip"
203
Roger Meierd9b331d2014-05-25 22:59:17 +0200204nodejs_protocols="binary compact json"
Roger Meier8909cbd2014-01-26 11:44:27 +0100205nodejs_transports="buffered framed"
Roger Meier57b354b2014-02-22 01:01:58 +0100206nodejs_sockets="ip ip-ssl"
Roger Meiereaa61d82012-01-12 21:38:29 +0000207
Jens Geyerc1d79432014-04-22 22:52:43 +0200208csharp_protocols="binary compact json"
209csharp_transports="buffered framed"
210csharp_sockets="ip ip-ssl"
211
Roger Meier72268b72014-05-28 23:03:57 +0200212py_protocols="binary compact json accel"
Roger Meier76150722014-05-31 22:22:07 +0200213py_transports="buffered framed"
214py_sockets="ip ip-ssl"
Roger Meier72268b72014-05-28 23:03:57 +0200215
Roger Meiera3570ac2014-06-10 22:16:14 +0200216ruby_protocols="binary compact json accel"
217ruby_transports="buffered framed"
218ruby_sockets="ip"
219
Noam Zilbersteinaf5d64a2014-07-31 15:44:13 -0700220hs_protocols="binary compact json"
221hs_transports="buffered"
222hs_sockets="ip"
223
Roger Meierf42ce2a2013-01-16 22:12:14 +0100224######### java client - java server #############
225for proto in $java_protocols; do
226 for trans in $java_server_transports; do
227 for sock in $java_sockets; do
228 case "$sock" in
229 "ip" ) extraparam="";;
230 "ip-ssl" ) extraparam="--ssl";;
231 esac
232 do_test "java-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530233 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
234 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
henriqued5aba4c2014-04-30 18:11:11 +0200235 "5" "1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100236 done
237 done
238done
239
240######### cpp client - cpp server ###############
241for proto in $cpp_protocols; do
242 for trans in $cpp_transports; do
243 for sock in $cpp_sockets; do
Roger Meier4d5157d2012-01-09 21:23:19 +0000244 case "$sock" in
245 "ip" ) extraparam="";;
246 "ip-ssl" ) extraparam="--ssl";;
247 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
248 esac
249 do_test "cpp-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530250 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
251 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +0200252 "2" "0.1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100253 done
254 done
255done
256
henriqued17f1c92014-04-30 16:21:25 +0200257
Roger Meierf42ce2a2013-01-16 22:12:14 +0100258######### java client - cpp server ##############
259# warning: ssl over http is not supported in java client!
260for proto in $(intersection "${java_protocols}" "${cpp_protocols}"); do
261 for trans in $(intersection "${java_client_transports}" "${cpp_transports}"); do
262 for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do
263 case "$sock" in
264 "ip" ) extraparam="";;
265 "ip-ssl" ) extraparam="--ssl";;
266 esac
Roger Meier188024e2014-04-17 21:53:45 +0200267 do_test "java-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530268 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
269 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}"\
henriqued5aba4c2014-04-30 18:11:11 +0200270 "5" "0.1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100271 done
272 done
273done
274
275######### cpp client - java server ##############
276for proto in $(intersection "${cpp_protocols}" "${java_protocols}"); do
277 for trans in $(intersection "${cpp_transports}" "${java_server_transports}"); do
278 for sock in $(intersection "${java_sockets}" "${cpp_sockets}"); do
279 case "$sock" in
280 "ip" ) extraparam="";;
281 "ip-ssl" ) extraparam="--ssl";;
282 esac
Roger Meier188024e2014-04-17 21:53:45 +0200283 do_test "cpp-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530284 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
285 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
henriqued5aba4c2014-04-30 18:11:11 +0200286 "5" "1"
Roger Meierf42ce2a2013-01-16 22:12:14 +0100287 done
288 done
289done
Roger Meier4d5157d2012-01-09 21:23:19 +0000290
Roger Meier15df0762014-09-29 20:50:56 +0200291######### c_glib client - c_glib server ##############
292for proto in ${c_glib_protocols}; do
293 for trans in ${c_glib_transports}; do
294 for sock in ${c_glib_sockets}; do
295 case "$sock" in
296 "ip" ) extraparam="";;
297 "ip-ssl" ) extraparam="--ssl";;
298 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
299 esac
300 do_test "c_glib-c_glib" "${proto}" "${trans}-${sock}" \
301 "c_glib/test_client --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
302 "c_glib/test_server --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
303 "2" "0.1"
304 done
305 done
306done
307
Roger Meierb3c84092014-09-01 21:53:40 +0200308######### c_glib client - cpp server ##############
309for proto in $(intersection "${c_glib_protocols}" "${cpp_protocols}"); do
310 for trans in $(intersection "${c_glib_transports}" "${cpp_transports}"); do
311 for sock in $(intersection "${c_glib_sockets}" "${cpp_sockets}"); do
312 case "$sock" in
313 "ip" ) extraparam="";;
314 "ip-ssl" ) extraparam="--ssl";;
315 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
316 esac
317 do_test "c_glib-cpp" "${proto}" "${trans}-${sock}" \
318 "c_glib/test_client --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
319 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}"\
320 "2" "0.1"
321 done
322 done
323done
324
Roger Meier15df0762014-09-29 20:50:56 +0200325######### cpp client - c_glib server ##############
326for proto in $(intersection "${cpp_protocols}" "${c_glib_protocols}"); do
327 for trans in $(intersection "${cpp_transports}" "${c_glib_transports}"); do
328 for sock in $(intersection "${cpp_sockets}" "${c_glib_sockets}"); do
329 case "$sock" in
330 "ip" ) extraparam="";;
331 "ip-ssl" ) extraparam="--ssl";;
332 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
333 esac
334 do_test "cpp-c_glib" "${proto}" "${trans}-${sock}" \
335 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}"\
336 "c_glib/test_server --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
337 "2" "0.1"
338 done
339 done
340done
341
Roger Meierb3c84092014-09-01 21:53:40 +0200342######### c_glib client - java server ##############
343for proto in $(intersection "${c_glib_protocols}" "${java_protocols}"); do
344 for trans in $(intersection "${c_glib_transports}" "${java_server_transports}"); do
345 for sock in $(intersection "${c_glib_sockets}" "${java_sockets}"); do
346 case "$sock" in
347 "ip" ) extraparam="";;
348 "ip-ssl" ) extraparam="--ssl";;
349 esac
350 do_test "c_glib-java" "${proto}" "${trans}-${sock}" \
351 "c_glib/test_client --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
352 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
353 "2" "2"
354 done
355 done
356done
357
Roger Meier15df0762014-09-29 20:50:56 +0200358######### java client - c_glib server ##############
359for proto in $(intersection "${java_protocols}" "${c_glib_protocols}"); do
360 for trans in $(intersection "${java_client_transports}" "${c_glib_transports}"); do
361 for sock in $(intersection "${java_sockets}" "${c_glib_sockets}"); do
362 case "$sock" in
363 "ip" ) extraparam="";;
364 "ip-ssl" ) extraparam="--ssl";;
365 esac
366 do_test "java-c_glib" "${proto}" "${trans}-${sock}" \
367 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
368 "c_glib/test_server --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
369 "5" "0.1"
370 done
371 done
372done
373
Roger Meier8909cbd2014-01-26 11:44:27 +0100374
henriqued17f1c92014-04-30 16:21:25 +0200375NODE_TEST_DIR=${BASEDIR}/../lib/nodejs/test
Roger Meier8909cbd2014-01-26 11:44:27 +0100376export NODE_PATH=${NODE_TEST_DIR}:${NODE_TEST_DIR}/../lib:${NODE_PATH}
Roger Meierd9b331d2014-05-25 22:59:17 +0200377######### nodejs client - nodejs server ##############
Roger Meierd9b331d2014-05-25 22:59:17 +0200378for proto in ${nodejs_protocols}; do
379 for trans in ${nodejs_transports}; do
380 for sock in ${nodejs_sockets}; do
381 case "$sock" in
382 "ip" ) extraparam="";;
383 "ip-ssl" ) extraparam="--ssl";;
384 esac
385 do_test "nodejs-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530386 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
387 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meierd9b331d2014-05-25 22:59:17 +0200388 "5" "0.2"
389 done
390 done
391done
henriqued5aba4c2014-04-30 18:11:11 +0200392
Roger Meier8909cbd2014-01-26 11:44:27 +0100393######### nodejs client - cpp server ##############
Roger Meier8909cbd2014-01-26 11:44:27 +0100394for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do
395 for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do
396 for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do
Roger Meier57b354b2014-02-22 01:01:58 +0100397 case "$sock" in
398 "ip" ) extraparam="";;
399 "ip-ssl" ) extraparam="--ssl";;
400 esac
henriqued17f1c92014-04-30 16:21:25 +0200401 do_test "nodejs-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530402 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
403 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +0200404 "5" "0.2"
Roger Meier8909cbd2014-01-26 11:44:27 +0100405 done
406 done
407done
408
409######### cpp client - nodejs server ##############
410for proto in $(intersection "${nodejs_protocols}" "${cpp_protocols}"); do
411 for trans in $(intersection "${nodejs_transports}" "${cpp_transports}"); do
412 for sock in $(intersection "${nodejs_sockets}" "${cpp_sockets}"); do
Roger Meier57b354b2014-02-22 01:01:58 +0100413 case "$sock" in
414 "ip" ) extraparam="";;
415 "ip-ssl" ) extraparam="--ssl";;
416 esac
henriqued17f1c92014-04-30 16:21:25 +0200417 do_test "cpp-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530418 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
419 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +0200420 "5" "2"
Roger Meier8909cbd2014-01-26 11:44:27 +0100421 done
422 done
423done
424
Roger Meier5c6ad242014-05-27 21:18:00 +0200425######### nodejs client - java server ##############
Roger Meier5c6ad242014-05-27 21:18:00 +0200426for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do
427 for trans in $(intersection "${nodejs_transports}" "${java_server_transports}"); do
428 for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do
429 case "$sock" in
430 "ip" ) extraparam="";;
431 "ip-ssl" ) extraparam="--ssl";;
432 esac
433 do_test "nodejs-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530434 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
435 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
Roger Meier5c6ad242014-05-27 21:18:00 +0200436 "5" "1"
437 done
438 done
439done
440
441######### java client - nodejs server ##############
442for proto in $(intersection "${nodejs_protocols}" "${java_protocols}"); do
443 for trans in $(intersection "${nodejs_transports}" "${java_client_transports}"); do
444 for sock in $(intersection "${nodejs_sockets}" "${java_sockets}"); do
445 case "$sock" in
446 "ip" ) extraparam="";;
447 "ip-ssl" ) extraparam="--ssl";;
448 esac
449 do_test "java-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530450 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
451 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meier5c6ad242014-05-27 21:18:00 +0200452 "5" "2"
453 done
454 done
455done
456
Roger Meier15df0762014-09-29 20:50:56 +0200457######### nodejs client - c_glib server ##############
458for proto in $(intersection "${nodejs_protocols}" "${c_glib_protocols}"); do
459 for trans in $(intersection "${nodejs_transports}" "${c_glib_transports}"); do
460 for sock in $(intersection "${nodejs_sockets}" "${c_glib_sockets}"); do
461 case "$sock" in
462 "ip" ) extraparam="";;
463 "ip-ssl" ) extraparam="--ssl";;
464 esac
465 do_test "nodejs-c_glib" "${proto}" "${trans}-${sock}" \
466 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
467 "c_glib/test_server --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
468 "5" "0.1"
469 done
470 done
471done
472
Roger Meierb3c84092014-09-01 21:53:40 +0200473######### c_glib client - nodejs server ##############
474for proto in $(intersection "${c_glib_protocols}" "${nodejs_protocols}"); do
475 for trans in $(intersection "${c_glib_transports}" "${nodejs_transports}"); do
476 for sock in $(intersection "${c_glib_sockets}" "${nodejs_sockets}"); do
477 case "$sock" in
478 "ip" ) extraparam="";;
479 "ip-ssl" ) extraparam="--ssl";;
480 esac
481 do_test "c_glib-nodejs" "${proto}" "${trans}-${sock}" \
482 "c_glib/test_client --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
483 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
484 "2" "2"
485 done
486 done
487done
488
Roger Meier72268b72014-05-28 23:03:57 +0200489######### py client - py server ##############
490for proto in ${py_protocols}; do
491 for trans in ${py_transports}; do
492 for sock in ${py_sockets}; do
493 case "$sock" in
494 "ip" ) extraparam="";;
495 "ip-ssl" ) extraparam="--ssl";;
496 esac
497 do_test "py-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530498 "py/TestClient.py --protocol=${proto} --transport={trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
499 "py/TestServer.py --protocol=${proto} --transport={trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200500 "10" "2"
501 done
502 done
503done
504
Roger Meier76150722014-05-31 22:22:07 +0200505for trans in ${py_transports}; do
506 for sock in ${py_sockets}; do
507 case "$sock" in
508 "ip" ) extraparam="";;
509 "ip-ssl" ) extraparam="--ssl";;
510 esac
511 do_test "py-py" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530512 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
513 "py/TestServer.py --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200514 "10" "2"
515 do_test "py-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530516 "py/TestClient.py --protocol=binary --transport={trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
517 "py/TestServer.py --protocol=accel --transport={trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200518 "10" "2"
519 done
520 done
521
Roger Meier72268b72014-05-28 23:03:57 +0200522######### py client - cpp server ##############
523for proto in $(intersection "${cpp_protocols}" "${py_protocols}"); do
524 for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
525 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
526 case "$sock" in
527 "ip" ) extraparam="";;
528 "ip-ssl" ) extraparam="--ssl";;
529 esac
530 do_test "py-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530531 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
532 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200533 "10" "2"
534 done
535 done
536done
537
Roger Meier76150722014-05-31 22:22:07 +0200538for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
539 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
540 case "$sock" in
541 "ip" ) extraparam="";;
542 "ip-ssl" ) extraparam="--ssl";;
543 esac
544 do_test "py-cpp" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530545 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
546 "cpp/TestServer --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200547 "10" "2"
548 done
549 done
550
Roger Meier72268b72014-05-28 23:03:57 +0200551######### cpp client - py server ##############
552for proto in $(intersection "${cpp_protocols}" "${py_protocols}"); do
553 for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
554 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
555 case "$sock" in
556 "ip" ) extraparam="";;
557 "ip-ssl" ) extraparam="--ssl";;
558 esac
559 do_test "cpp-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530560 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
561 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200562 "10" "2"
563 done
564 done
565done
566
Roger Meier76150722014-05-31 22:22:07 +0200567for trans in $(intersection "${cpp_transports}" "${py_transports}"); do
568 for sock in $(intersection "${cpp_sockets}" "${py_sockets}"); do
569 case "$sock" in
570 "ip" ) extraparam="";;
571 "ip-ssl" ) extraparam="--ssl";;
572 esac
573 do_test "cpp-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530574 "cpp/TestClient --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
575 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200576 "10" "2"
577 done
578 done
579
Roger Meier72268b72014-05-28 23:03:57 +0200580######### py client - java server ##############
Roger Meier72268b72014-05-28 23:03:57 +0200581for proto in $(intersection "${py_protocols}" "${java_protocols}"); do
582 for trans in $(intersection "${py_transports}" "${java_server_transports}"); do
583 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
584 case "$sock" in
585 "ip" ) extraparam="";;
586 "ip-ssl" ) extraparam="--ssl";;
587 esac
588 do_test "py-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530589 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
590 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
Roger Meier72268b72014-05-28 23:03:57 +0200591 "15" "2"
592 done
593 done
594done
595
Roger Meier76150722014-05-31 22:22:07 +0200596for trans in $(intersection "${py_transports}" "${java_server_transports}"); do
597 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
598 case "$sock" in
599 "ip" ) extraparam="";;
600 "ip-ssl" ) extraparam="--ssl";;
601 esac
602 do_test "py-java" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530603 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
604 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
Roger Meier76150722014-05-31 22:22:07 +0200605 "15" "2"
606 done
607 done
608
Roger Meier72268b72014-05-28 23:03:57 +0200609######### java client - py server ##############
610for proto in $(intersection "${py_protocols}" "${java_protocols}"); do
611 for trans in $(intersection "${py_transports}" "${java_client_transports}"); do
612 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
613 case "$sock" in
614 "ip" ) extraparam="";;
615 "ip-ssl" ) extraparam="--ssl";;
616 esac
617 do_test "java-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530618 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
619 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200620 "10" "5"
621 done
622 done
623done
624
Roger Meier76150722014-05-31 22:22:07 +0200625for trans in $(intersection "${py_transports}" "${java_client_transports}"); do
626 for sock in $(intersection "${py_sockets}" "${java_sockets}"); do
627 case "$sock" in
628 "ip" ) extraparam="";;
629 "ip-ssl" ) extraparam="--ssl";;
630 esac
631 do_test "java-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530632 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
633 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200634 "10" "5"
635 done
636 done
637
Roger Meier15df0762014-09-29 20:50:56 +0200638######### py client - c_glib server ##############
639for proto in $(intersection "${py_protocols}" "${c_glib_protocols}"); do
640 for trans in $(intersection "${py_transports}" "${c_glib_transports}"); do
641 for sock in $(intersection "${py_sockets}" "${c_glib_sockets}"); do
642 case "$sock" in
643 "ip" ) extraparam="";;
644 "ip-ssl" ) extraparam="--ssl";;
645 esac
646 do_test "py-c_glib" "${proto}" "${trans}-${sock}" \
647 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
648 "c_glib/test_server --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
649 "10" "0.1"
650 done
651 done
652done
653
654for trans in $(intersection "${py_transports}" "${c_glib_transports}"); do
655 for sock in $(intersection "${py_sockets}" "${c_glib_sockets}"); do
656 case "$sock" in
657 "ip" ) extraparam="";;
658 "ip-ssl" ) extraparam="--ssl";;
659 esac
660 do_test "py-c_glib" "accel-binary" "${trans}-${sock}" \
661 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
662 "c_glib/test_server --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
663 "10" "0.1"
664 done
665 done
666
Roger Meierb3c84092014-09-01 21:53:40 +0200667######### c_glib client - py server ##############
668for proto in $(intersection "${c_glib_protocols}" "${py_protocols}"); do
669 for trans in $(intersection "${c_glib_transports}" "${py_transports}"); do
670 for sock in $(intersection "${c_glib_sockets}" "${py_sockets}"); do
671 case "$sock" in
672 "ip" ) extraparam="";;
673 "ip-ssl" ) extraparam="--ssl";;
674 esac
675 do_test "c_glib-py" "${proto}" "${trans}-${sock}" \
676 "c_glib/test_client --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
677 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
678 "2" "2"
679 done
680 done
681done
682
Roger Meier15df0762014-09-29 20:50:56 +0200683for trans in $(intersection "${c_glib_transports}" "${py_transports}"); do
684 for sock in $(intersection "${c_glib_sockets}" "${py_sockets}"); do
685 case "$sock" in
686 "ip" ) extraparam="";;
687 "ip-ssl" ) extraparam="--ssl";;
688 esac
689 do_test "c_glib-py" "binary-accel" "${trans}-${sock}" \
690 "c_glib/test_client --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
691 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
692 "10" "2"
693 done
694 done
695
Roger Meier72268b72014-05-28 23:03:57 +0200696######### py client - nodejs server ##############
Roger Meier72268b72014-05-28 23:03:57 +0200697for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do
698 for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
699 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
700 case "$sock" in
701 "ip" ) extraparam="";;
702 "ip-ssl" ) extraparam="--ssl";;
703 esac
704 do_test "py-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530705 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
706 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200707 "15" "2"
708 done
709 done
710done
711
Roger Meier76150722014-05-31 22:22:07 +0200712for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
713 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
714 case "$sock" in
715 "ip" ) extraparam="";;
716 "ip-ssl" ) extraparam="--ssl";;
717 esac
718 do_test "py-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530719 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
720 "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200721 "15" "2"
722 done
723 done
724
Roger Meier72268b72014-05-28 23:03:57 +0200725######### nodejs client - py server ##############
726for proto in $(intersection "${py_protocols}" "${nodejs_protocols}"); do
727 for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
728 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
729 case "$sock" in
730 "ip" ) extraparam="";;
731 "ip-ssl" ) extraparam="--ssl";;
732 esac
733 do_test "nodejs-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530734 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
735 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier72268b72014-05-28 23:03:57 +0200736 "10" "2"
737 done
738 done
739done
740
Roger Meier76150722014-05-31 22:22:07 +0200741for trans in $(intersection "${py_transports}" "${nodejs_transports}"); do
742 for sock in $(intersection "${py_sockets}" "${nodejs_sockets}"); do
743 case "$sock" in
744 "ip" ) extraparam="";;
745 "ip-ssl" ) extraparam="--ssl";;
746 esac
747 do_test "nodejs-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530748 "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
749 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meier76150722014-05-31 22:22:07 +0200750 "10" "2"
751 done
752 done
753
Roger Meiera3570ac2014-06-10 22:16:14 +0200754######### ruby client - ruby server ##############
755for proto in ${ruby_protocols}; do
756 for trans in ${ruby_transports}; do
757 for sock in ${ruby_sockets}; do
758 case "$sock" in
759 "ip" ) extraparam="";;
760 "ip-ssl" ) extraparam="--ssl";;
761 esac
762 do_test "ruby-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530763 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
764 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200765 "5" "5"
766 done
767 done
768done
769
770for trans in ${ruby_transports}; do
771 for sock in ${ruby_sockets}; do
772 case "$sock" in
773 "ip" ) extraparam="";;
774 "ip-ssl" ) extraparam="--ssl";;
775 esac
776 do_test "ruby-ruby" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530777 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
778 "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200779 "5" "5"
780 do_test "ruby-ruby" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530781 "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
782 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200783 "5" "5"
784 done
785 done
786
787######### ruby client - cpp server ##############
788for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do
789 for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
790 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
791 case "$sock" in
792 "ip" ) extraparam="";;
793 "ip-ssl" ) extraparam="--ssl";;
794 esac
795 do_test "ruby-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530796 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
797 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200798 "5" "5"
799 done
800 done
801done
802
803for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
804 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
805 case "$sock" in
806 "ip" ) extraparam="";;
807 "ip-ssl" ) extraparam="--ssl";;
808 esac
809 do_test "ruby-cpp" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530810 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
811 "cpp/TestServer --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200812 "5" "5"
813 done
814 done
815
816######### cpp client - ruby server ##############
817for proto in $(intersection "${cpp_protocols}" "${ruby_protocols}"); do
818 for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
819 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
820 case "$sock" in
821 "ip" ) extraparam="";;
822 "ip-ssl" ) extraparam="--ssl";;
823 esac
824 do_test "cpp-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530825 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}" \
826 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200827 "5" "5"
828 done
829 done
830done
831
832for trans in $(intersection "${cpp_transports}" "${ruby_transports}"); do
833 for sock in $(intersection "${cpp_sockets}" "${ruby_sockets}"); do
834 case "$sock" in
835 "ip" ) extraparam="";;
836 "ip-ssl" ) extraparam="--ssl";;
837 esac
838 do_test "cpp-ruby" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530839 "cpp/TestClient --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}" \
840 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200841 "5" "5"
842 done
843 done
844
845######### ruby client - java server ##############
846for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do
847 for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do
848 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
849 case "$sock" in
850 "ip" ) extraparam="";;
851 "ip-ssl" ) extraparam="--ssl";;
852 esac
853 do_test "ruby-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530854 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
855 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200856 "15" "5"
857 done
858 done
859done
860
861for trans in $(intersection "${ruby_transports}" "${java_server_transports}"); do
862 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
863 case "$sock" in
864 "ip" ) extraparam="";;
865 "ip-ssl" ) extraparam="--ssl";;
866 esac
867 do_test "ruby-java" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530868 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
869 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200870 "15" "5"
871 done
872 done
873
874######### java client - ruby server ##############
875for proto in $(intersection "${ruby_protocols}" "${java_protocols}"); do
876 for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do
877 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
878 case "$sock" in
879 "ip" ) extraparam="";;
880 "ip-ssl" ) extraparam="--ssl";;
881 esac
882 do_test "java-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530883 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
884 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200885 "10" "5"
886 done
887 done
888done
889
890for trans in $(intersection "${ruby_transports}" "${java_client_transports}"); do
891 for sock in $(intersection "${ruby_sockets}" "${java_sockets}"); do
892 case "$sock" in
893 "ip" ) extraparam="";;
894 "ip-ssl" ) extraparam="--ssl";;
895 esac
896 do_test "java-ruby" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530897 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
898 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200899 "10" "5"
900 done
901 done
902
Roger Meier15df0762014-09-29 20:50:56 +0200903######### ruby client - c_glib server ##############
904for proto in $(intersection "${ruby_protocols}" "${c_glib_protocols}"); do
905 for trans in $(intersection "${ruby_transports}" "${c_glib_transports}"); do
906 for sock in $(intersection "${ruby_sockets}" "${c_glib_sockets}"); do
907 case "$sock" in
908 "ip" ) extraparam="";;
909 "ip-ssl" ) extraparam="--ssl";;
910 esac
911 do_test "ruby-c_glib" "${proto}" "${trans}-${sock}" \
912 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
913 "c_glib/test_server --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
914 "5" "0.1"
915 done
916 done
917done
918
919for trans in $(intersection "${ruby_transports}" "${c_glib_transports}"); do
920 for sock in $(intersection "${ruby_sockets}" "${c_glib_sockets}"); do
921 case "$sock" in
922 "ip" ) extraparam="";;
923 "ip-ssl" ) extraparam="--ssl";;
924 esac
925 do_test "ruby-c_glib" "accel-binary" "${trans}-${sock}" \
926 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
927 "c_glib/test_server --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
928 "5" "0.1"
929 done
930 done
931
Roger Meierb3c84092014-09-01 21:53:40 +0200932######### c_glib client - ruby server ##############
933for proto in $(intersection "${c_glib_protocols}" "${ruby_protocols}"); do
934 for trans in $(intersection "${c_glib_transports}" "${ruby_transports}"); do
935 for sock in $(intersection "${c_glib_sockets}" "${ruby_sockets}"); do
936 case "$sock" in
937 "ip" ) extraparam="";;
938 "ip-ssl" ) extraparam="--ssl";;
939 esac
940 do_test "c_glib-ruby" "${proto}" "${trans}-${sock}" \
941 "c_glib/test_client --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
942 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
943 "2" "2"
944 done
945 done
946done
947
Roger Meier15df0762014-09-29 20:50:56 +0200948for trans in $(intersection "${c_glib_transports}" "${ruby_transports}"); do
949 for sock in $(intersection "${c_glib_sockets}" "${ruby_sockets}"); do
950 case "$sock" in
951 "ip" ) extraparam="";;
952 "ip-ssl" ) extraparam="--ssl";;
953 esac
954 do_test "c_glib-ruby" "binary-accel" "${trans}-${sock}" \
955 "c_glib/test_client --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}" \
956 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
957 "5" "5"
958 done
959 done
960
Roger Meiera3570ac2014-06-10 22:16:14 +0200961######### ruby client - nodejs server ##############
962for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do
963 for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
964 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
965 case "$sock" in
966 "ip" ) extraparam="";;
967 "ip-ssl" ) extraparam="--ssl";;
968 esac
969 do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530970 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
971 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200972 "5" "2"
973 done
974 done
975done
976
977for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
978 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
979 case "$sock" in
980 "ip" ) extraparam="";;
981 "ip-ssl" ) extraparam="--ssl";;
982 esac
983 do_test "ruby-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530984 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
985 "node ${NODE_TEST_DIR}/server.js -p binary -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +0200986 "5" "2"
987 done
988 done
989
990######### nodejs client - ruby server ##############
991for proto in $(intersection "${ruby_protocols}" "${nodejs_protocols}"); do
992 for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
993 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
994 case "$sock" in
995 "ip" ) extraparam="";;
996 "ip-ssl" ) extraparam="--ssl";;
997 esac
998 do_test "nodejs-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +0530999 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1000 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +02001001 "10" "5"
1002 done
1003 done
1004done
1005
1006for trans in $(intersection "${ruby_transports}" "${nodejs_transports}"); do
1007 for sock in $(intersection "${ruby_sockets}" "${nodejs_sockets}"); do
1008 case "$sock" in
1009 "ip" ) extraparam="";;
1010 "ip-ssl" ) extraparam="--ssl";;
1011 esac
1012 do_test "nodejs-ruby" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301013 "node ${NODE_TEST_DIR}/client.js -p binary -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1014 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +02001015 "10" "2"
1016 done
1017 done
1018
cdwijayarathnad9217912014-08-15 22:18:30 +05301019######### py client - ruby server ##############
Roger Meiera3570ac2014-06-10 22:16:14 +02001020for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do
1021 for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
1022 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
1023 case "$sock" in
1024 "ip" ) extraparam="";;
1025 "ip-ssl" ) extraparam="--ssl";;
1026 esac
1027 do_test "py-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301028 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
1029 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +02001030 "15" "5"
1031 done
1032 done
1033done
1034
1035for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
1036 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
1037 case "$sock" in
1038 "ip" ) extraparam="";;
1039 "ip-ssl" ) extraparam="--ssl";;
1040 esac
1041 do_test "py-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301042 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
1043 "ruby rb/integration/TestServer.rb --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +02001044 "15" "5"
1045 do_test "py-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301046 "py/TestClient.py --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
1047 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +02001048 "15" "5"
1049 done
1050 done
1051
1052######### ruby client - py server ##############
1053for proto in $(intersection "${py_protocols}" "${ruby_protocols}"); do
1054 for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
1055 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
1056 case "$sock" in
1057 "ip" ) extraparam="";;
1058 "ip-ssl" ) extraparam="--ssl";;
1059 esac
1060 do_test "ruby-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301061 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1062 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +02001063 "5" "2"
1064 done
1065 done
1066done
1067
1068for trans in $(intersection "${py_transports}" "${ruby_transports}"); do
1069 for sock in $(intersection "${py_sockets}" "${ruby_sockets}"); do
1070 case "$sock" in
1071 "ip" ) extraparam="";;
1072 "ip-ssl" ) extraparam="--ssl";;
1073 esac
1074 do_test "ruby-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301075 "ruby rb/integration/TestClient.rb --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1076 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +02001077 "5" "2"
1078 do_test "ruby-py" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301079 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1080 "py/TestServer.py --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
Roger Meiera3570ac2014-06-10 22:16:14 +02001081 "5" "2"
1082 done
1083 done
1084
cdwijayarathnad9217912014-08-15 22:18:30 +05301085######### hs client - hs server ###############
1086for proto in $hs_protocols; do
1087 for trans in $hs_transports; do
1088 for sock in $hs_sockets; do
1089 case "$sock" in
1090 "ip" ) extraparam="";;
1091 "ip-ssl" ) extraparam="--ssl";;
1092 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
1093 esac
1094 do_test "hs-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301095 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1096 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301097 "2" "0.1"
1098 done
1099 done
1100done
1101
1102######### hs client - cpp server ###############
1103for proto in $(intersection "${hs_protocols}" "${cpp_protocols}"); do
1104 for trans in $(intersection "${hs_transports}" "${cpp_transports}"); do
1105 for sock in $(intersection "${hs_sockets}" "${cpp_sockets}"); do
1106 case "$sock" in
1107 "ip" ) extraparam="";;
1108 "ip-ssl" ) extraparam="--ssl";;
1109 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
1110 esac
1111 do_test "hs-cpp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301112 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1113 "cpp/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301114 "2" "0.1"
1115 done
1116 done
1117done
1118
1119######### cpp client - hs server ###############
1120for proto in $(intersection "${hs_protocols}" "${cpp_protocols}"); do
1121 for trans in $(intersection "${hs_transports}" "${cpp_transports}"); do
1122 for sock in $(intersection "${hs_sockets}" "${cpp_sockets}"); do
1123 case "$sock" in
1124 "ip" ) extraparam="";;
1125 "ip-ssl" ) extraparam="--ssl";;
1126 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
1127 esac
1128 do_test "cpp-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301129 "cpp/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1130 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301131 "2" "0.1"
1132 done
1133 done
1134done
1135
1136######### hs client - java server ###############
1137for proto in $(intersection "${hs_protocols}" "${java_protocols}"); do
1138 for trans in $(intersection "${hs_transports}" "${java_transports}"); do
1139 for sock in $(intersection "${hs_sockets}" "${java_sockets}"); do
1140 case "$sock" in
1141 "ip" ) extraparam="";;
1142 "ip-ssl" ) extraparam="--ssl";;
1143 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
1144 esac
1145 do_test "hs-java" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301146 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1147 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testserver" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301148 "5" "1"
1149 done
1150 done
1151done
1152
1153######### java client - hs server ###############
1154for proto in $(intersection "${hs_protocols}" "${java_protocols}"); do
1155 for trans in $(intersection "${hs_transports}" "${java_transports}"); do
1156 for sock in $(intersection "${hs_sockets}" "${java_sockets}"); do
1157 case "$sock" in
1158 "ip" ) extraparam="";;
1159 "ip-ssl" ) extraparam="--ssl";;
1160 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
1161 esac
1162 do_test "java-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301163 "ant -f ../lib/java/build.xml -Dno-gen-thrift=\"\" -Dtestargs \"--protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}\" run-testclient" \
1164 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301165 "5" "1"
1166 done
1167 done
1168done
1169
Roger Meier15df0762014-09-29 20:50:56 +02001170######### hs client - c_glib server ###############
1171for proto in $(intersection "${hs_protocols}" "${c_glib_protocols}"); do
1172 for trans in $(intersection "${hs_transports}" "${c_glib_transports}"); do
1173 for sock in $(intersection "${hs_sockets}" "${c_glib_sockets}"); do
1174 case "$sock" in
1175 "ip" ) extraparam="";;
1176 "ip-ssl" ) extraparam="--ssl";;
1177 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
1178 esac
1179 do_test "hs-c_glib" "${proto}" "${trans}-${sock}" \
1180 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1181 "c_glib/test_server --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1182 "2" "0.1"
1183 done
1184 done
1185done
1186
Roger Meierb3c84092014-09-01 21:53:40 +02001187######### c_glib client - hs server ###############
1188for proto in $(intersection "${c_glib_protocols}" "${hs_protocols}"); do
1189 for trans in $(intersection "${c_glib_transports}" "${hs_transports}"); do
1190 for sock in $(intersection "${c_glib_sockets}" "${hs_sockets}"); do
1191 case "$sock" in
1192 "ip" ) extraparam="";;
1193 "ip-ssl" ) extraparam="--ssl";;
1194 "domain" ) extraparam="--domain-socket=/tmp/ThriftTest.thrift";;
1195 esac
1196 do_test "c_glib-hs" "${proto}" "${trans}-${sock}" \
1197 "c_glib/test_client --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1198 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1199 "2" "0.1"
1200 done
1201 done
1202done
1203
cdwijayarathnad9217912014-08-15 22:18:30 +05301204######### py client -hs server ##############
1205for proto in $(intersection "${hs_protocols}" "${py_protocols}"); do
1206 for trans in $(intersection "${hs_transports}" "${py_transports}"); do
1207 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
1208 case "$sock" in
1209 "ip" ) extraparam="";;
1210 "ip-ssl" ) extraparam="--ssl";;
1211 esac
1212 do_test "py-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301213 "py/TestClient.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
1214 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301215 "10" "2"
1216 done
1217 done
1218done
1219
1220for trans in $(intersection "${hs_transports}" "${py_transports}"); do
1221 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
1222 case "$sock" in
1223 "ip" ) extraparam="";;
1224 "ip-ssl" ) extraparam="--ssl";;
1225 esac
1226 do_test "py-hs" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301227 "py/TestClient.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --host=localhost --genpydir=gen-py ${extraparam}" \
1228 "hs/TestServer --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301229 "10" "2"
1230 done
1231 done
1232
1233######### hs client - py server ##############
1234for proto in $(intersection "${hs_protocols}" "${py_protocols}"); do
1235 for trans in $(intersection "${hs_transports}" "${py_transports}"); do
1236 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
1237 case "$sock" in
1238 "ip" ) extraparam="";;
1239 "ip-ssl" ) extraparam="--ssl";;
1240 esac
1241 do_test "hs-py" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301242 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1243 "py/TestServer.py --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301244 "10" "2"
1245 done
1246 done
1247done
1248
1249for trans in $(intersection "${hs_transports}" "${py_transports}"); do
1250 for sock in $(intersection "${hs_sockets}" "${py_sockets}"); do
1251 case "$sock" in
1252 "ip" ) extraparam="";;
1253 "ip-ssl" ) extraparam="--ssl";;
1254 esac
1255 do_test "hs-py" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301256 "hs/TestClient --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1257 "py/TestServer.py --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} --genpydir=gen-py TSimpleServer ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301258 "10" "2"
1259 done
1260 done
1261
1262######### nodejs client - hs server ##############
1263for proto in $(intersection "${nodejs_protocols}" "${hs_protocols}"); do
1264 for trans in $(intersection "${nodejs_transports}" "${hs_transports}"); do
1265 for sock in $(intersection "${nodejs_sockets}" "${hs_sockets}"); do
1266 case "$sock" in
1267 "ip" ) extraparam="";;
1268 "ip-ssl" ) extraparam="--ssl";;
1269 esac
1270 do_test "nodejs-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301271 "node ${NODE_TEST_DIR}/client.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1272 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301273 "5" "0.2"
1274 done
1275 done
1276done
1277
1278######### hs client - nodejs server ##############
1279for proto in $(intersection "${nodejs_protocols}" "${hs_protocols}"); do
1280 for trans in $(intersection "${nodejs_transports}" "${hs_transports}"); do
1281 for sock in $(intersection "${nodejs_sockets}" "${hs_sockets}"); do
1282 case "$sock" in
1283 "ip" ) extraparam="";;
1284 "ip-ssl" ) extraparam="--ssl";;
1285 esac
1286 do_test "hs-nodejs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301287 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1288 "node ${NODE_TEST_DIR}/server.js -p ${proto} -t ${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301289 "5" "2"
1290 done
1291 done
1292done
1293
1294######### ruby client - hs server ##############
1295for proto in $(intersection "${hs_protocols}" "${ruby_protocols}"); do
1296 for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1297 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1298 case "$sock" in
1299 "ip" ) extraparam="";;
1300 "ip-ssl" ) extraparam="--ssl";;
1301 esac
1302 do_test "ruby-hs" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301303 "ruby rb/integration/TestClient.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1304 "hs/TestServer --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301305 "5" "5"
1306 done
1307 done
1308done
1309
1310for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1311 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1312 case "$sock" in
1313 "ip" ) extraparam="";;
1314 "ip-ssl" ) extraparam="--ssl";;
1315 esac
1316 do_test "ruby-cpp" "accel-binary" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301317 "ruby rb/integration/TestClient.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam} ${extraparam}" \
1318 "hs/TestServer --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301319 "5" "5"
1320 done
1321 done
1322
1323######### hs client - ruby server ##############
1324for proto in $(intersection "${hs_protocols}" "${ruby_protocols}"); do
1325 for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1326 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1327 case "$sock" in
1328 "ip" ) extraparam="";;
1329 "ip-ssl" ) extraparam="--ssl";;
1330 esac
1331 do_test "hs-ruby" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301332 "hs/TestClient --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1333 "ruby rb/integration/TestServer.rb --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301334 "5" "5"
1335 done
1336 done
1337done
1338
1339for trans in $(intersection "${hs_transports}" "${ruby_transports}"); do
1340 for sock in $(intersection "${hs_sockets}" "${ruby_sockets}"); do
1341 case "$sock" in
1342 "ip" ) extraparam="";;
1343 "ip-ssl" ) extraparam="--ssl";;
1344 esac
1345 do_test "hs-ruby" "binary-accel" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301346 "hs/TestClient --protocol=binary --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1347 "ruby rb/integration/TestServer.rb --protocol=accel --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
cdwijayarathnad9217912014-08-15 22:18:30 +05301348 "5" "5"
1349 done
1350 done
1351
Roger Meiera3570ac2014-06-10 22:16:14 +02001352
Roger Meier691ec002012-11-02 07:50:24 +00001353# delete Unix Domain Socket used by cpp tests
1354rm -f /tmp/ThriftTest.thrift
1355
Jens Geyerc1d79432014-04-22 22:52:43 +02001356######### csharp client - csharp server #############
1357export MONO_PATH=../lib/csharp
1358for proto in $csharp_protocols; do
1359 for trans in $csharp_transports; do
1360 for sock in $csharp_sockets; do
1361 case "$sock" in
1362 "ip" ) extraparam="";;
1363 "ip-ssl" ) extraparam="--ssl";;
1364 esac
1365 do_test "csharp-csharp" "${proto}" "${trans}-${sock}" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301366 "../lib/csharp/test/ThriftTest/TestClientServer.exe client --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
1367 "../lib/csharp/test/ThriftTest/TestClientServer.exe server --protocol=${proto} --transport=${trans} --port=${THRIFT_TEST_PORT} ${extraparam}" \
henriqued5aba4c2014-04-30 18:11:11 +02001368 "5" "1"
Jens Geyerc1d79432014-04-22 22:52:43 +02001369 done
1370 done
1371done
1372
Roger Meier4edac7f2014-05-02 21:07:01 +02001373do_test "js-java" "json" "http-ip" \
Roger Meier4d5157d2012-01-09 21:23:19 +00001374 "" \
1375 "ant -f ../lib/js/test/build.xml unittest" \
henriqued17f1c92014-04-30 16:21:25 +02001376 "2" "2"
Roger Meier4d5157d2012-01-09 21:23:19 +00001377do_test "perl-cpp" "binary" "buffered-ip" \
Roger Meier01b568c2012-01-10 21:30:02 +00001378 "perl -I perl/gen-perl/ -I../lib/perl/lib/ perl/TestClient.pl" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301379 "cpp/TestServer --port=${THRIFT_TEST_PORT}" \
henriqued5aba4c2014-04-30 18:11:11 +02001380 "10" "2"
Roger Meierb33967b2012-01-21 09:18:05 +00001381do_test "php-cpp" "binary" "buffered-ip" \
1382 "make -C php/ client" \
cdwijayarathna9ea3d2e2014-08-16 17:28:40 +05301383 "cpp/TestServer --port=${THRIFT_TEST_PORT}" \
henriqued5aba4c2014-04-30 18:11:11 +02001384 "10" "2"
Roger Meier4edac7f2014-05-02 21:07:01 +02001385
1386echo " failed tests are logged to test/log/error.log"
Roger Meiercc0fe272014-05-16 23:18:25 +02001387echo " full log is here test/log/client_server_protocol_transport_client.log"
1388echo " full log is here test/log/client_server_protocol_transport_server.log"
1389echo " or look at file://$BASEDIR/$STATUS_HTML"
1390
henriquead4df162014-05-20 13:18:45 +02001391ELAPSED_TIME=$(echo "(${SECONDS} - ${START_TIME})" | bc)
1392DURATION="${ELAPSED_TIME} seconds"
Roger Meierbea27342014-08-08 00:30:50 +02001393
1394echo $FAILED failed of $TESTCOUNT tests in total
Roger Meiercc0fe272014-05-16 23:18:25 +02001395echo "test an took" $DURATION
1396print_html_footer "$DURATION"
1397
Roger Meier4edac7f2014-05-02 21:07:01 +02001398date
Roger Meier82525772012-11-16 00:38:27 +00001399cd -