From 786c6d4345e98d8f2bdb9a3e63cd666fc6f57615 Mon Sep 17 00:00:00 2001 From: idning Date: Tue, 28 Apr 2015 08:43:32 +0800 Subject: [PATCH] add testcase for issue_323 --- tests/test_redis/test_basic.py | 11 +++++++++++ travis.sh | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/test_redis/test_basic.py b/tests/test_redis/test_basic.py index 428fee17..2f417e6d 100644 --- a/tests/test_redis/test_basic.py +++ b/tests/test_redis/test_basic.py @@ -112,5 +112,16 @@ def get_stat(name): assert(get_stat('requests') == 22) assert(get_stat('responses') == 22) +def test_issue_323(): + # do on redis + r = all_redis[0] + c = redis.Redis(r.host(), r.port()) + assert([1, 'OK'] == c.eval("return {1, redis.call('set', 'x', '1')}", 1, 'tmp')) + + # do on twemproxy + c = getconn() + assert([1, 'OK'] == c.eval("return {1, redis.call('set', 'x', '1')}", 1, 'tmp')) + def setup_and_wait(): time.sleep(60*60) + diff --git a/travis.sh b/travis.sh index 55bdf728..766ef802 100644 --- a/travis.sh +++ b/travis.sh @@ -18,7 +18,7 @@ fi #build twemproxy CFLAGS="-ggdb3 -O0" autoreconf -fvi && ./configure --enable-debug=log && make -cp src/nutcracker tests/_binaries/ +ln -s `pwd`/src/nutcracker tests/_binaries/ cp `which redis-server` tests/_binaries/ cp `which redis-cli` tests/_binaries/ cp `which memcached` tests/_binaries/