details: https://github.com/nginx/njs/commit/ca23804e399635431b6861cb558182045e4f72c1 branches: master commit: ca23804e399635431b6861cb558182045e4f72c1 user: Dmitry Volyntsev <xei...@nginx.com> date: Fri, 6 Dec 2024 17:37:22 -0800 description: Tests: skipping stream_js_periodic.t for QuickJS engine.
--- nginx/t/stream_js_periodic.t | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) 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', <<EOF); import fs from 'fs'; + function engine(r) { + r.return(200, njs.engine); + } + function affinity() { ngx.shared.workers.set(ngx.worker_id, 1); } @@ -266,28 +276,30 @@ $t->write_file('test.js', <<EOF); export default { affinity, fetch, fetch_exception, js_set, multiple_fetches, file, overrun, test, tick, tick_exception, timer, - timer_exception, timeout_exception, vars }; + timer_exception, timeout_exception, vars, engine }; EOF $t->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(); _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org https://mailman.nginx.org/mailman/listinfo/nginx-devel