comparison memcached.t @ 50:b494fe5b12d1

Tests: add waitforfile() and waitforsocket() functions. This functions add ability to wait for external daemons to start before running tests.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 19 Nov 2008 17:31:03 +0300
parents d68b85def521
children ec7903def1bb
comparison
equal deleted inserted replaced
49:b01ae969181b 50:b494fe5b12d1
61 EOF 61 EOF
62 62
63 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8081'); 63 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8081');
64 $t->run(); 64 $t->run();
65 65
66 $t->waitforsocket('127.0.0.1:8081')
67 or die "Can't start memcached";
68
66 ############################################################################### 69 ###############################################################################
67 70
68 my $memd = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ]); 71 my $memd = Cache::Memcached->new(servers => [ '127.0.0.1:8081' ]);
69 $memd->set('/', 'SEE-THIS'); 72 $memd->set('/', 'SEE-THIS');
70 73