memcached: change tests to have a 5 second timeout so they don't hang the build machine. Fixes #80.

db4
John Benediktsson 2011-09-06 09:32:15 -07:00
parent b13eb201bd
commit 223cb423d8
1 changed files with 10 additions and 2 deletions

View File

@ -1,12 +1,20 @@
! Copyright (C) 2010 John Benediktsson
! See http://factorcode.org/license.txt for BSD license
USING: arrays assocs calendar math math.functions memcached
memcached.private kernel present sequences sorting system
USING: arrays assocs calendar io io.encodings.binary io.sockets
io.timeouts kernel math math.functions memcached
memcached.private namespaces present sequences sorting system
threads tools.test ;
IN: memcached.tests
! Use a version of with-memcached that sets a timeout
: with-memcached ( quot -- )
memcached-server get-global binary [
5 seconds input-stream get set-timeout
call
] with-client ; inline
<PRIVATE
: not-found? ( quot -- )