-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new test with shell script, because original python test seems br…
…oken (even at https://travis-ci.org/idning/twemproxy, only do build and install test).
- Loading branch information
Showing
9 changed files
with
1,487 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
default: | ||
listen: 0.0.0.0:6379 | ||
hash: fnv1a_64 | ||
distribution: ketama | ||
redis: true | ||
server_retry_timeout: 2000 | ||
server_failure_limit: 1 | ||
servers: | ||
- 127.0.0.1:7379:1 sv1 | ||
- 127.0.0.1:7380:1 sv2 |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
|
||
source ./start_cluster.sh | ||
|
||
bash $1 | ||
RET=$? | ||
|
||
source ./stop_cluster.sh | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
REDIS=`which redis-server` | ||
mkdir dir/7379 | ||
$REDIS ./conf/7379.conf | ||
mkdir dir/7380 | ||
$REDIS ./conf/7380.conf | ||
|
||
NC=`which nutcracker` | ||
$NC -c ./conf/nutcracker.yml & | ||
|
||
sleep 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
killall redis-server | ||
killall nutcracker | ||
rm -rf dir/73*/* | ||
rm -rf dir/logs/*.log | ||
rm -rf dir/pid/*.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
redis-cli -p 7379 SET a x | ||
RET=`redis-cli -p 7379 GET a` | ||
[ "$RET" != "x" ] && echo "redis not running" && exit -1 | ||
RET=`redis-cli -p 7380 GET a` | ||
[ "$RET" = "x" ] && echo "replica setting wrongly applied" && exit -1 | ||
|
||
SHA1=`redis-cli script load 'return "hello"'` | ||
echo "SHA1:$SHA1" | ||
RET=`redis-cli -p 7379 evalsha $SHA1 1 key` | ||
[ "$RET" != "hello" ] && echo "script not correctly loaded at 7379" && exit -1 | ||
RET=`redis-cli -p 7380 evalsha $SHA1 1 key` | ||
[ "$RET" != "hello" ] && echo "script not correctly loaded at 7380" && exit -1 | ||
|
||
echo "success" |