Skip to content

Commit

Permalink
修改Pika测试目录 (OpenAtomFoundation#90)
Browse files Browse the repository at this point in the history
* modify test

* add tests/tmp

* update tests/README.md and support a simple test script

* update tests/README.md
  • Loading branch information
Leviathan authored and KernelMaker committed May 15, 2017
1 parent b7b8730 commit 25e2f2a
Show file tree
Hide file tree
Showing 68 changed files with 90 additions and 63 deletions.
5 changes: 5 additions & 0 deletions pikatest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
cp output/bin/pika src/redis-server
cp output/conf/pika.conf tests/assets/default.conf

tclsh tests/test_helper.tcl --clients 1 --single unit/$1
3 changes: 0 additions & 3 deletions pikatests/TESTREAD

This file was deleted.

10 changes: 0 additions & 10 deletions pikatests/pikatest.sh

This file was deleted.

48 changes: 0 additions & 48 deletions pikatests/tests/assets/default.conf

This file was deleted.

5 changes: 5 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Pika test

* 删除上次执行的db, log目录
* 在Pika目录下执行 `sudo ./pikatests.sh geo` 测试Pika GEO命令
* 如果是`unit/type`接口, 例如 SET, 执行 `sudo ./pikatests.sh type/set` 测试Pika SET命令
77 changes: 77 additions & 0 deletions tests/assets/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Pika port
port : 9221
# Thread Number
thread-num : 1
# Sync Thread Number
sync-thread-num : 6
# Item count of sync thread queue
sync-buffer-size : 10
# Pika log path
log-path : ./log/
# Pika glog level: only INFO and ERROR
loglevel : info
# Pika db path
db-path : ./db/
# Pika write-buffer-size
write-buffer-size : 268435456
# Pika timeout
timeout : 60
# Requirepass
requirepass :
# Masterauth
masterauth :
# Userpass
userpass :
# User Blacklist
userblacklist :
# Dump Prefix
dump-prefix :
# daemonize [yes | no]
#daemonize : yes
# slotmigrate [yes | no]
#slotmigrate : no
# Dump Path
dump-path : ./dump/
# pidfile Path
pidfile : ./pika.pid
# Max Connection
maxclients : 20000
# the per file size of sst to compact, defalut is 2M
target-file-size-base : 20971520
# Expire-logs-days
expire-logs-days : 7
# Expire-logs-nums
expire-logs-nums : 10
# Root-connection-num
root-connection-num : 2
# Slowlog-log-slower-than
slowlog-log-slower-than : 10000
# slave-read-only(yes/no, 1/0)
slave-read-only : 0
# Pika db sync path
db-sync-path : ./dbsync/
# db sync speed(MB) max is set to 125MB, min is set to 0, and if below 0 or above 125, the value will be adjust to 125
db-sync-speed : -1
# network interface
# network-interface : eth1
# replication
# slaveof : master-ip:master-port
# CronTask, format: start:end-ratio, like 02-04/60, pika will check to schedule compaction between 2 to 4 o'clock everyday
# if the freesize/disksize > 60%
# compact-cron :

###################
## Critical Settings
###################
# binlog file size: default is 100M, limited in [1K, 2G]
binlog-file-size : 104857600
# Compression
compression : snappy
# max-background-flushes: default is 1, limited in [1, 4]
max-background-flushes : 1
# max-background-compactions: default is 1, limited in [1, 4]
max-background-compactions : 2
# max-cache-files default is 5000
max-cache-files : 5000
# max_bytes_for_level_multiplier: default is 10, you can change it to 5
max-bytes-for-level-multiplier : 10
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ proc start_server {options {code undefined}} {
if {$::valgrind} {
set pid [exec valgrind --suppressions=src/valgrind.sup --show-reachable=no --show-possibly-lost=no --leak-check=full src/redis-server $config_file > $stdout 2> $stderr &]
} else {
#set pid [exec src/redis-server -c $config_file > $stdout 2> $stderr &]
set pid [exec src/redis-server $config_file > $stdout 2> $stderr &]
set pid [exec src/redis-server -c $config_file > $stdout 2> $stderr &]
#set pid [exec src/redis-server $config_file > $stdout 2> $stderr &]
}

puts "Starting ---- "
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions tests/tmp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 25e2f2a

Please sign in to comment.