THRIFT-3373: cross test cleanup
Client: build, node, c_glib, cpp, hs, py, rb
Patch: Nobuaki Sukegawa
Github Pull Request:
This closes #641
commit 338f1a502961a4f63b0bd4b3dae4099062d6d17f
Author: Nobuaki Sukegawa <nsukeg@gmail.com>
Date: 2015-10-09T17:25:18Z
THRIFT-3373 Various fixes for cross test servers and clients
diff --git a/test/c_glib/Makefile.am b/test/c_glib/Makefile.am
index 7559fd6..4f9a119 100755
--- a/test/c_glib/Makefile.am
+++ b/test/c_glib/Makefile.am
@@ -29,7 +29,7 @@
libtestcglib_la_LIBADD = $(top_builddir)/lib/c_glib/libthrift_c_glib.la
-precross: test_client test_server
+precross: libtestcglib.la test_client test_server
check_PROGRAMS = \
test_client \
diff --git a/test/c_glib/src/thrift_test_handler.c b/test/c_glib/src/thrift_test_handler.c
index a9983b5..69ddbc1 100644
--- a/test/c_glib/src/thrift_test_handler.c
+++ b/test/c_glib/src/thrift_test_handler.c
@@ -68,7 +68,7 @@
THRIFT_UNUSED_VAR (iface);
THRIFT_UNUSED_VAR (error);
- printf ("testByte(%s)\n", thing ? "true" : "false");
+ printf ("testBool(%s)\n", thing ? "true" : "false");
*_return = thing;
return TRUE;
@@ -144,7 +144,7 @@
THRIFT_UNUSED_VAR (error);
printf ("testBinary()\n"); // TODO: hex output
- g_byte_array_append( *_return, thing->data, thing->len);
+ *_return = thing;
return TRUE;
}
@@ -701,16 +701,17 @@
g_assert (*err1 == NULL);
g_assert (*err2 == NULL);
- if (strncmp (arg0, "Xception", 9) == 0) {
+ if (strncmp (arg0, "Xception", 8) == 0 && strlen(arg0) == 8) {
*err1 = g_object_new (T_TEST_TYPE_XCEPTION,
"errorCode", 1001,
"message", g_strdup ("This is an Xception"),
NULL);
result = FALSE;
}
- else if (strncmp (arg0, "Xception2", 10) == 0) {
+ else if (strncmp (arg0, "Xception2", 9) == 0) {
*err2 = g_object_new (T_TEST_TYPE_XCEPTION2,
- "errorCode", 2002);
+ "errorCode", 2002,
+ NULL);
g_object_get (*err2,
"struct_thing", &struct_thing,
@@ -783,6 +784,9 @@
base_class->test_double =
klass->test_double =
thrift_test_handler_test_double;
+ base_class->test_binary =
+ klass->test_binary =
+ thrift_test_handler_test_binary;
base_class->test_struct =
klass->test_struct =
thrift_test_handler_test_struct;
diff --git a/test/c_glib/src/thrift_test_handler.h b/test/c_glib/src/thrift_test_handler.h
index 957bbda..b64cb16 100644
--- a/test/c_glib/src/thrift_test_handler.h
+++ b/test/c_glib/src/thrift_test_handler.h
@@ -86,6 +86,10 @@
gdouble*_return,
const gdouble thing,
GError **error);
+ gboolean (*test_binary) (TTestThriftTestIf *iface,
+ GByteArray **_return,
+ const GByteArray *thing,
+ GError **error);
gboolean (*test_struct) (TTestThriftTestIf *iface,
TTestXtruct **_return,
const TTestXtruct *thing,
diff --git a/test/cpp/Makefile.am b/test/cpp/Makefile.am
index 89fed8f..bc026b2 100755
--- a/test/cpp/Makefile.am
+++ b/test/cpp/Makefile.am
@@ -100,10 +100,10 @@
#
THRIFT = $(top_builddir)/compiler/cpp/thrift
-gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift
+gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT)
$(THRIFT) --gen cpp:templates,cob_style -r $<
-gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp gen-cpp/Service.cpp: $(top_srcdir)/test/StressTest.thrift
+gen-cpp/StressTest_types.cpp gen-cpp/StressTest_constants.cpp gen-cpp/Service.cpp: $(top_srcdir)/test/StressTest.thrift $(THRIFT)
$(THRIFT) --gen cpp $<
AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp
diff --git a/test/hs/Makefile.am b/test/hs/Makefile.am
index b41a391..3f35396 100644
--- a/test/hs/Makefile.am
+++ b/test/hs/Makefile.am
@@ -19,7 +19,7 @@
THRIFT = $(top_builddir)/compiler/cpp/thrift
-stubs: ../ConstantsDemo.thrift ../DebugProtoTest.thrift ../ThriftTest.thrift ../Include.thrift
+stubs: $(THRIFT) ../ConstantsDemo.thrift ../DebugProtoTest.thrift ../ThriftTest.thrift ../Include.thrift
$(THRIFT) --gen hs ../ConstantsDemo.thrift
$(THRIFT) --gen hs ../DebugProtoTest.thrift
$(THRIFT) --gen hs ../ThriftTest.thrift
diff --git a/test/known_failures_Linux.json b/test/known_failures_Linux.json
index c22c906..cf17cae 100644
--- a/test/known_failures_Linux.json
+++ b/test/known_failures_Linux.json
@@ -1,13 +1,4 @@
[
- "c_glib-cpp_binary_buffered-ip",
- "c_glib-cpp_binary_framed-ip",
- "c_glib-csharp_binary_buffered-ip",
- "c_glib-csharp_binary_framed-ip",
- "c_glib-hs_binary_buffered-ip",
- "c_glib-hs_binary_framed-ip",
- "c_glib-java_binary_buffered-ip",
- "c_glib-java_binary_framed-fastframed-ip",
- "c_glib-java_binary_framed-ip",
"c_glib-nodejs_binary_buffered-ip",
"c_glib-nodejs_binary_framed-ip",
"c_glib-py_binary-accel_buffered-ip",
@@ -30,12 +21,6 @@
"cpp-java_compact_http-ip-ssl",
"cpp-java_json_http-ip",
"cpp-java_json_http-ip-ssl",
- "cpp-rb_binary-accel_buffered-ip",
- "cpp-rb_binary-accel_framed-ip",
- "cpp-rb_binary_buffered-ip",
- "cpp-rb_binary_framed-ip",
- "cpp-rb_compact_buffered-ip",
- "cpp-rb_compact_framed-ip",
"cpp-rb_json_buffered-ip",
"cpp-rb_json_framed-ip",
"csharp-cpp_binary_buffered-ip-ssl",
@@ -52,28 +37,20 @@
"csharp-go_json_framed-ip-ssl",
"csharp-hs_json_buffered-ip",
"csharp-hs_json_framed-ip",
- "csharp-nodejs_binary_buffered-ip",
"csharp-nodejs_binary_buffered-ip-ssl",
"csharp-nodejs_binary_framed-ip-ssl",
- "csharp-nodejs_compact_buffered-ip",
"csharp-nodejs_compact_buffered-ip-ssl",
"csharp-nodejs_compact_framed-ip-ssl",
"csharp-nodejs_json_buffered-ip",
"csharp-nodejs_json_buffered-ip-ssl",
"csharp-nodejs_json_framed-ip",
"csharp-nodejs_json_framed-ip-ssl",
- "csharp-rb_binary-accel_buffered-ip",
- "csharp-rb_binary-accel_framed-ip",
- "csharp-rb_binary_buffered-ip",
- "csharp-rb_binary_framed-ip",
- "csharp-rb_compact_buffered-ip",
- "csharp-rb_compact_framed-ip",
- "csharp-rb_json_buffered-ip",
- "csharp-rb_json_framed-ip",
"go-cpp_json_buffered-ip",
"go-cpp_json_buffered-ip-ssl",
"go-cpp_json_framed-ip",
"go-cpp_json_framed-ip-ssl",
+ "go-dart_binary_framed-ip",
+ "go-dart_json_framed-ip",
"go-hs_json_buffered-ip",
"go-hs_json_framed-ip",
"go-java_json_buffered-ip",
@@ -82,18 +59,6 @@
"go-java_json_framed-fastframed-ip-ssl",
"go-java_json_framed-ip",
"go-java_json_framed-ip-ssl",
- "go-nodejs_binary_buffered-ip",
- "go-nodejs_binary_buffered-ip-ssl",
- "go-nodejs_binary_framed-ip",
- "go-nodejs_binary_framed-ip-ssl",
- "go-nodejs_compact_buffered-ip",
- "go-nodejs_compact_buffered-ip-ssl",
- "go-nodejs_compact_framed-ip",
- "go-nodejs_compact_framed-ip-ssl",
- "go-nodejs_json_buffered-ip",
- "go-nodejs_json_buffered-ip-ssl",
- "go-nodejs_json_framed-ip",
- "go-nodejs_json_framed-ip-ssl",
"go-perl_binary_buffered-ip-ssl",
"go-perl_binary_framed-ip-ssl",
"hs-cpp_json_buffered-ip",
@@ -102,15 +67,14 @@
"hs-csharp_compact_framed-ip",
"hs-csharp_json_buffered-ip",
"hs-csharp_json_framed-ip",
+ "hs-dart_binary_framed-ip",
+ "hs-dart_json_buffered-ip",
+ "hs-dart_json_framed-ip",
"hs-go_json_buffered-ip",
"hs-go_json_framed-ip",
"hs-java_json_buffered-ip",
"hs-java_json_framed-fastframed-ip",
"hs-java_json_framed-ip",
- "hs-nodejs_binary_buffered-ip",
- "hs-nodejs_binary_framed-ip",
- "hs-nodejs_compact_buffered-ip",
- "hs-nodejs_compact_framed-ip",
"hs-nodejs_json_buffered-ip",
"hs-nodejs_json_framed-ip",
"hs-py_json_buffered-ip",
@@ -125,22 +89,10 @@
"java-rb_json_buffered-ip",
"java-rb_json_fastframed-framed-ip",
"java-rb_json_framed-ip",
- "nodejs-cpp_binary_buffered-ip",
- "nodejs-cpp_binary_buffered-ip-ssl",
- "nodejs-cpp_binary_framed-ip",
- "nodejs-cpp_binary_framed-ip-ssl",
"nodejs-cpp_compact_buffered-ip",
"nodejs-cpp_compact_buffered-ip-ssl",
"nodejs-cpp_compact_framed-ip",
"nodejs-cpp_compact_framed-ip-ssl",
- "nodejs-cpp_json_buffered-ip",
- "nodejs-cpp_json_buffered-ip-ssl",
- "nodejs-cpp_json_framed-ip",
- "nodejs-cpp_json_framed-ip-ssl",
- "nodejs-csharp_binary_buffered-ip",
- "nodejs-csharp_binary_buffered-ip-ssl",
- "nodejs-csharp_binary_framed-ip",
- "nodejs-csharp_binary_framed-ip-ssl",
"nodejs-csharp_compact_buffered-ip",
"nodejs-csharp_compact_buffered-ip-ssl",
"nodejs-csharp_compact_framed-ip",
@@ -149,38 +101,17 @@
"nodejs-csharp_json_buffered-ip-ssl",
"nodejs-csharp_json_framed-ip",
"nodejs-csharp_json_framed-ip-ssl",
- "nodejs-hs_binary_buffered-ip",
- "nodejs-hs_binary_framed-ip",
- "nodejs-hs_compact_buffered-ip",
- "nodejs-hs_compact_framed-ip",
+ "nodejs-dart_json_buffered-ip",
+ "nodejs-dart_json_framed-ip",
"nodejs-hs_json_buffered-ip",
"nodejs-hs_json_framed-ip",
- "nodejs-java_binary_buffered-ip",
- "nodejs-java_binary_buffered-ip-ssl",
- "nodejs-java_binary_framed-fastframed-ip",
- "nodejs-java_binary_framed-fastframed-ip-ssl",
- "nodejs-java_binary_framed-ip",
- "nodejs-java_binary_framed-ip-ssl",
"nodejs-java_compact_buffered-ip",
"nodejs-java_compact_buffered-ip-ssl",
"nodejs-java_compact_framed-fastframed-ip",
"nodejs-java_compact_framed-fastframed-ip-ssl",
"nodejs-java_compact_framed-ip",
"nodejs-java_compact_framed-ip-ssl",
- "nodejs-java_json_buffered-ip",
"nodejs-java_json_buffered-ip-ssl",
- "nodejs-java_json_framed-fastframed-ip",
- "nodejs-java_json_framed-fastframed-ip-ssl",
- "nodejs-java_json_framed-ip",
- "nodejs-java_json_framed-ip-ssl",
- "nodejs-py_binary-accel_buffered-ip",
- "nodejs-py_binary-accel_buffered-ip-ssl",
- "nodejs-py_binary-accel_framed-ip",
- "nodejs-py_binary-accel_framed-ip-ssl",
- "nodejs-py_binary_buffered-ip",
- "nodejs-py_binary_buffered-ip-ssl",
- "nodejs-py_binary_framed-ip",
- "nodejs-py_binary_framed-ip-ssl",
"nodejs-py_compact_buffered-ip",
"nodejs-py_compact_buffered-ip-ssl",
"nodejs-py_compact_framed-ip",
@@ -189,10 +120,6 @@
"nodejs-py_json_buffered-ip-ssl",
"nodejs-py_json_framed-ip",
"nodejs-py_json_framed-ip-ssl",
- "nodejs-rb_binary-accel_buffered-ip",
- "nodejs-rb_binary-accel_framed-ip",
- "nodejs-rb_binary_buffered-ip",
- "nodejs-rb_binary_framed-ip",
"nodejs-rb_compact_buffered-ip",
"nodejs-rb_compact_framed-ip",
"nodejs-rb_json_buffered-ip",
@@ -204,20 +131,10 @@
"py-nodejs_json_buffered-ip-ssl",
"py-nodejs_json_framed-ip",
"py-nodejs_json_framed-ip-ssl",
- "py-rb_accel-binary_buffered-ip",
- "py-rb_accel-binary_framed-ip",
- "py-rb_accel_buffered-ip",
- "py-rb_accel_framed-ip",
- "py-rb_binary-accel_buffered-ip",
- "py-rb_binary-accel_framed-ip",
- "py-rb_binary_buffered-ip",
- "py-rb_binary_framed-ip",
- "py-rb_compact_buffered-ip",
- "py-rb_compact_framed-ip",
- "py-rb_json_buffered-ip",
- "py-rb_json_framed-ip",
"rb-cpp_json_buffered-ip",
"rb-cpp_json_framed-ip",
+ "rb-hs_json_buffered-ip",
+ "rb-hs_json_framed-ip",
"rb-java_json_buffered-ip",
"rb-java_json_framed-fastframed-ip",
"rb-java_json_framed-ip",
diff --git a/test/py/Makefile.am b/test/py/Makefile.am
index d3f0a7d..1f710f1 100755
--- a/test/py/Makefile.am
+++ b/test/py/Makefile.am
@@ -38,7 +38,7 @@
gen-py-dynamicslots/ThriftTest/__init__.py \
gen-py-dynamicslots/DebugProtoTest/__init__.py
-precross: $(THRIFT) $(thrift_gen)
+precross: $(thrift_gen)
BUILT_SOURCES = $(thrift_gen)
helper_scripts= \
@@ -53,30 +53,30 @@
TESTS= $(py_unit_tests)
-gen-py/%/__init__.py: ../%.thrift
+gen-py/%/__init__.py: ../%.thrift $(THRIFT)
$(THRIFT) --gen py $<
-gen-py-default/%/__init__.py: ../%.thrift
+gen-py-default/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-default || $(MKDIR_P) gen-py-default
$(THRIFT) --gen py -out gen-py-default $<
-gen-py-slots/%/__init__.py: ../%.thrift
+gen-py-slots/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-slots || $(MKDIR_P) gen-py-slots
$(THRIFT) --gen py:slots -out gen-py-slots $<
-gen-py-newstyle/%/__init__.py: ../%.thrift
+gen-py-newstyle/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-newstyle || $(MKDIR_P) gen-py-newstyle
$(THRIFT) --gen py:new_style -out gen-py-newstyle $<
-gen-py-newstyleslots/%/__init__.py: ../%.thrift
+gen-py-newstyleslots/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-newstyleslots || $(MKDIR_P) gen-py-newstyleslots
$(THRIFT) --gen py:new_style,slots -out gen-py-newstyleslots $<
-gen-py-dynamic/%/__init__.py: ../%.thrift
+gen-py-dynamic/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-dynamic || $(MKDIR_P) gen-py-dynamic
$(THRIFT) --gen py:dynamic -out gen-py-dynamic $<
-gen-py-dynamicslots/%/__init__.py: ../%.thrift
+gen-py-dynamicslots/%/__init__.py: ../%.thrift $(THRIFT)
test -d gen-py-dynamicslots || $(MKDIR_P) gen-py-dynamicslots
$(THRIFT) --gen py:dynamic,slots -out gen-py-dynamicslots $<
diff --git a/test/py/TestServer.py b/test/py/TestServer.py
index b5696ca..e7478e4 100755
--- a/test/py/TestServer.py
+++ b/test/py/TestServer.py
@@ -27,7 +27,7 @@
from optparse import OptionParser
# Print TServer log to stdout so that the test-runner can redirect it to log files
-logging.basicConfig()
+logging.basicConfig(level=logging.DEBUG)
parser = OptionParser()
parser.add_option('--genpydir', type='string', dest='genpydir',
@@ -80,56 +80,56 @@
class TestHandler(object):
def testVoid(self):
if options.verbose > 1:
- print('testVoid()')
+ logging.info('testVoid()')
def testString(self, str):
if options.verbose > 1:
- print('testString(%s)' % str)
+ logging.info('testString(%s)' % str)
return str
def testBool(self, boolean):
if options.verbose > 1:
- print('testBool(%s)' % str(boolean).lower())
+ logging.info('testBool(%s)' % str(boolean).lower())
return boolean
def testByte(self, byte):
if options.verbose > 1:
- print('testByte(%d)' % byte)
+ logging.info('testByte(%d)' % byte)
return byte
def testI16(self, i16):
if options.verbose > 1:
- print('testI16(%d)' % i16)
+ logging.info('testI16(%d)' % i16)
return i16
def testI32(self, i32):
if options.verbose > 1:
- print('testI32(%d)' % i32)
+ logging.info('testI32(%d)' % i32)
return i32
def testI64(self, i64):
if options.verbose > 1:
- print('testI64(%d)' % i64)
+ logging.info('testI64(%d)' % i64)
return i64
def testDouble(self, dub):
if options.verbose > 1:
- print('testDouble(%f)' % dub)
+ logging.info('testDouble(%f)' % dub)
return dub
def testBinary(self, thing):
if options.verbose > 1:
- print('testBinary()') # TODO: hex output
+ logging.info('testBinary()') # TODO: hex output
return thing
def testStruct(self, thing):
if options.verbose > 1:
- print('testStruct({%s, %d, %d, %d})' % (thing.string_thing, thing.byte_thing, thing.i32_thing, thing.i64_thing))
+ logging.info('testStruct({%s, %s, %s, %s})' % (thing.string_thing, thing.byte_thing, thing.i32_thing, thing.i64_thing))
return thing
def testException(self, arg):
# if options.verbose > 1:
- print('testException(%s)' % arg)
+ logging.info('testException(%s)' % arg)
if arg == 'Xception':
raise Xception(errorCode=1001, message=arg)
elif arg == 'TException':
@@ -137,7 +137,7 @@
def testMultiException(self, arg0, arg1):
if options.verbose > 1:
- print('testMultiException(%s, %s)' % (arg0, arg1))
+ logging.info('testMultiException(%s, %s)' % (arg0, arg1))
if arg0 == 'Xception':
raise Xception(errorCode=1001, message='This is an Xception')
elif arg0 == 'Xception2':
@@ -148,49 +148,49 @@
def testOneway(self, seconds):
if options.verbose > 1:
- print('testOneway(%d) => sleeping...' % seconds)
+ logging.info('testOneway(%d) => sleeping...' % seconds)
time.sleep(seconds / 3) # be quick
if options.verbose > 1:
- print('done sleeping')
+ logging.info('done sleeping')
def testNest(self, thing):
if options.verbose > 1:
- print('testNest(%s)' % thing)
+ logging.info('testNest(%s)' % thing)
return thing
def testMap(self, thing):
if options.verbose > 1:
- print('testMap(%s)' % thing)
+ logging.info('testMap(%s)' % thing)
return thing
def testStringMap(self, thing):
if options.verbose > 1:
- print('testStringMap(%s)' % thing)
+ logging.info('testStringMap(%s)' % thing)
return thing
def testSet(self, thing):
if options.verbose > 1:
- print('testSet(%s)' % thing)
+ logging.info('testSet(%s)' % thing)
return thing
def testList(self, thing):
if options.verbose > 1:
- print('testList(%s)' % thing)
+ logging.info('testList(%s)' % thing)
return thing
def testEnum(self, thing):
if options.verbose > 1:
- print('testEnum(%s)' % thing)
+ logging.info('testEnum(%s)' % thing)
return thing
def testTypedef(self, thing):
if options.verbose > 1:
- print('testTypedef(%s)' % thing)
+ logging.info('testTypedef(%s)' % thing)
return thing
def testMapMap(self, thing):
if options.verbose > 1:
- print('testMapMap(%s)' % thing)
+ logging.info('testMapMap(%s)' % thing)
return {
-4: {
-4: -4,
@@ -208,7 +208,7 @@
def testInsanity(self, argument):
if options.verbose > 1:
- print('testInsanity(%s)' % argument)
+ logging.info('testInsanity(%s)' % argument)
return {
1: {
2: argument,
@@ -219,7 +219,7 @@
def testMulti(self, arg0, arg1, arg2, arg3, arg4, arg5):
if options.verbose > 1:
- print('testMulti(%s)' % [arg0, arg1, arg2, arg3, arg4, arg5])
+ logging.info('testMulti(%s)' % [arg0, arg1, arg2, arg3, arg4, arg5])
return Xtruct(string_thing='Hello2',
byte_thing=arg0, i32_thing=arg1, i64_thing=arg2)
@@ -241,7 +241,7 @@
# Handle THttpServer as a special case
if server_type == 'THttpServer':
- server =THttpServer.THttpServer(processor, ('', options.port), pfactory)
+ server = THttpServer.THttpServer(processor, ('', options.port), pfactory)
server.serve()
sys.exit(0)
@@ -266,7 +266,7 @@
tfactory = TTransport.TBufferedTransportFactory()
# if --zlib, then wrap server transport, and use a different transport factory
if options.zlib:
- transport = TZlibTransport.TZlibTransport(transport) # wrap with zlib
+ transport = TZlibTransport.TZlibTransport(transport) # wrap with zlib
tfactory = TZlibTransport.TZlibTransportFactory()
# do server-specific setup here:
@@ -282,10 +282,10 @@
def clean_shutdown(signum, frame):
for worker in server.workers:
if options.verbose > 0:
- print('Terminating worker: %s' % worker)
+ logging.info('Terminating worker: %s' % worker)
worker.terminate()
if options.verbose > 0:
- print('Requesting server to stop()')
+ logging.info('Requesting server to stop()')
try:
server.stop()
except:
diff --git a/test/rb/integration/TestClient.rb b/test/rb/integration/TestClient.rb
index fb339c4..d04f475 100755
--- a/test/rb/integration/TestClient.rb
+++ b/test/rb/integration/TestClient.rb
@@ -45,13 +45,13 @@
elsif a.start_with?("--transport")
$transport = a.split("=")[1]
elsif a.start_with?("--port")
- $port = a.split("=")[1].to_i
+ $port = a.split("=")[1].to_i
end
end
ARGV=[]
class SimpleClientTest < Test::Unit::TestCase
- def setup
+ def setup
unless @socket
@socket = Thrift::Socket.new($host, $port)
if $transport == "buffered"
@@ -77,7 +77,11 @@
@socket.open
end
end
-
+
+ def teardown
+ @socket.close
+ end
+
def test_void
p 'test_void'
@client.testVoid()
@@ -129,7 +133,7 @@
ret = @client.testBinary(val.pack('C*'))
assert_equal(val, ret.bytes.to_a)
end
-
+
def test_map
p 'test_map'
val = {1 => 1, 2 => 2, 3 => 3}