Mercurial > hg > nginx-tests
comparison upstream_hash_memcached.t @ 415:020c4e47ecac
Tests: revert 068d020a8f85 and localize $? instead.
The problem observed was due to $? being overwritten in the destructor
after it has been set by exit(), specifically by waitpid() in stop_daemons().
Fix is to localize $? in the destructor to make sure it won't be
accidentally changed.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 20 Jun 2014 21:01:52 +0400 |
parents | 068d020a8f85 |
children | 907e89fba9c3 |
comparison
equal
deleted
inserted
replaced
414:068d020a8f85 | 415:020c4e47ecac |
---|---|
102 if ($memhelp =~ /-U/) { | 102 if ($memhelp =~ /-U/) { |
103 # UDP port is on by default in memcached 1.2.7+ | 103 # UDP port is on by default in memcached 1.2.7+ |
104 push @memopts, '-U', '0'; | 104 push @memopts, '-U', '0'; |
105 } | 105 } |
106 | 106 |
107 $t->try_run('no upstream hash')->plan(4); | |
108 | |
109 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8081', @memopts); | 107 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8081', @memopts); |
110 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8082', @memopts); | 108 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8082', @memopts); |
111 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8083', @memopts); | 109 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8083', @memopts); |
110 $t->try_run('no upstream hash')->plan(4); | |
112 | 111 |
113 $t->waitforsocket('127.0.0.1:8081') or die "Can't start memcached"; | 112 $t->waitforsocket('127.0.0.1:8081') or die "Can't start memcached"; |
114 $t->waitforsocket('127.0.0.1:8082') or die "Can't start memcached"; | 113 $t->waitforsocket('127.0.0.1:8082') or die "Can't start memcached"; |
115 $t->waitforsocket('127.0.0.1:8083') or die "Can't start memcached"; | 114 $t->waitforsocket('127.0.0.1:8083') or die "Can't start memcached"; |
116 | 115 |