From: Dmitry Volyntsev Date: Sat, 7 Dec 2024 01:37:22 +0000 (-0800) Subject: Tests: skipping stream_js_periodic.t for QuickJS engine. X-Git-Tag: 0.8.9~11 X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=ca23804e399635431b6861cb558182045e4f72c1;p=njs.git Tests: skipping stream_js_periodic.t for QuickJS engine. --- diff --git a/nginx/t/stream_js_periodic.t b/nginx/t/stream_js_periodic.t index 3c4dfd1a..4b9e319b 100644 --- a/nginx/t/stream_js_periodic.t +++ b/nginx/t/stream_js_periodic.t @@ -53,7 +53,7 @@ stream { } server { - listen 127.0.0.1:8080; + listen 127.0.0.1:8081; js_periodic test.tick interval=30ms jitter=1ms; js_periodic test.timer interval=1s worker_affinity=all; @@ -78,10 +78,16 @@ stream { http { %%TEST_GLOBALS_HTTP%% + js_import test.js; + server { - listen 127.0.0.1:8081; + listen 127.0.0.1:8080; server_name localhost; + location /engine { + js_content test.engine; + } + location /fetch_ok { return 200 'ok'; } @@ -94,11 +100,15 @@ http { EOF -my $p1 = port(8081); +my $p1 = port(8080); $t->write_file('test.js', <write_file('test.js', <run_daemon(\&stream_daemon, port(8090)); -$t->try_run('no js_periodic')->plan(9); +$t->try_run('no js_periodic'); +plan(skip_all => 'not yet') if http_get('/engine') =~ /QuickJS$/m; +$t->plan(9); $t->waitforsocket('127.0.0.1:' . port(8090)); ############################################################################### select undef, undef, undef, 0.2; -is(stream('127.0.0.1:' . port(8080))->io('affinity'), 'affinity', +is(stream('127.0.0.1:' . port(8081))->io('affinity'), 'affinity', 'affinity test'); -is(stream('127.0.0.1:' . port(8080))->io('tick'), 'tick', '3x tick test'); -is(stream('127.0.0.1:' . port(8080))->io('timer'), 'timer', 'timer test'); -is(stream('127.0.0.1:' . port(8080))->io('file'), 'file', 'file test'); -is(stream('127.0.0.1:' . port(8080))->io('fetch'), 'fetch', 'fetch test'); -is(stream('127.0.0.1:' . port(8080))->io('multiple_fetches'), +is(stream('127.0.0.1:' . port(8081))->io('tick'), 'tick', '3x tick test'); +is(stream('127.0.0.1:' . port(8081))->io('timer'), 'timer', 'timer test'); +is(stream('127.0.0.1:' . port(8081))->io('file'), 'file', 'file test'); +is(stream('127.0.0.1:' . port(8081))->io('fetch'), 'fetch', 'fetch test'); +is(stream('127.0.0.1:' . port(8081))->io('multiple_fetches'), 'multiple_fetches', 'muliple fetches test'); -is(stream('127.0.0.1:' . port(8080))->io('timeout_exception'), +is(stream('127.0.0.1:' . port(8081))->io('timeout_exception'), 'timeout_exception', 'timeout exception test'); -is(stream('127.0.0.1:' . port(8080))->io('vars'), 'vars', 'vars test'); +is(stream('127.0.0.1:' . port(8081))->io('vars'), 'vars', 'vars test'); $t->stop();