From 89ac851776e718b8563113fd228a642b30ce432b Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 6 Sep 2011 09:32:15 -0700 Subject: [PATCH] memcached: change tests to have a 5 second timeout so they don't hang the build machine. Fixes #80. --- extra/memcached/memcached-tests.factor | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/extra/memcached/memcached-tests.factor b/extra/memcached/memcached-tests.factor index e7c79355d2..e05c5aadd5 100644 --- a/extra/memcached/memcached-tests.factor +++ b/extra/memcached/memcached-tests.factor @@ -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 +