comparison proxy_cache_lock.t @ 392:c28ecaef065f

Tests: try_run() introduced. This method replaces multiple ad-hoc solutions to grecefully skip tests if nginx startup fails, e.g., due to no support for a particular directive.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 18 Apr 2014 18:36:26 +0400
parents 6a0d934950bc
children 847ea345becb
comparison
equal deleted inserted replaced
391:915ef26ac6eb 392:c28ecaef065f
68 68
69 EOF 69 EOF
70 70
71 $t->run_daemon(\&http_fake_daemon); 71 $t->run_daemon(\&http_fake_daemon);
72 72
73 eval { 73 $t->try_run('no proxy_cache_lock')->plan(19);
74 open OLDERR, ">&", \*STDERR; close STDERR; 74
75 $t->run();
76 open STDERR, ">&", \*OLDERR;
77 };
78 plan(skip_all => 'no proxy_cache_lock') if $@;
79
80 $t->plan(19);
81 $t->waitforsocket('127.0.0.1:8081'); 75 $t->waitforsocket('127.0.0.1:8081');
82 76
83 ############################################################################### 77 ###############################################################################
84 78
85 # sequentional requests 79 # sequentional requests