redis编译错误:Test replication partial resync: no backlog in tests/integration/replication-psync.tcl

下午配置一台centos服务器,编译redis, 运行make test 报了这样的一个错误:

!!! WARNING The following tests failed:
*** [err]: Test replication partial resync: ok psync (diskless: yes, reconnect: 1) in tests/integration/replication-psync.tcl
Expected condition ‘[s -1 sync_partial_ok] > 0’ to be true ([s -1 sync_partial_ok] > 0)
Cleanup: may take some time… OK
make[1]: *** [test] Error 1
make[1]: Leaving directory `/usr/local/src/redis-3.2.1/src’
make: *** [test] Error 2

■ 解决办法:

1,只用单核运行 make test:

taskset -c 1 sudo make test


2,更改 tests/integration/replication-psync.tcl 文件:

vi tests/integration/replication-psync.tcl

把对应报错的那段代码中的 after后面的数字,从100改成 500。我个人觉得,这个参数貌似是等待的毫秒数。


编辑文件tests/integration/replication-psync.tcl

然后找到after 100 把此值修改成200或者300。重新执行make test就可以了



same issue on

Linux sie 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux

was able to pass all tests ONLY when using single CPU core using:

taskset -c 0 sudo make test

is it OK to run the server anyway?