~ubuntu-branches/ubuntu/saucy/nginx/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/t/023-rewrite/uthread-spawn.t

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Kartik Mistry, Cyril Lavier, Michael Lustfield
  • Date: 2012-12-18 10:29:18 UTC
  • mfrom: (4.2.56 sid)
  • Revision ID: package-import@ubuntu.com-20121218102918-dxtwj9vj89sbj8dz
Tags: 1.2.6-1
[ Kartik Mistry ]
* New upstream release.
* debian/nginx-common.nginx.init:
  + Used log_*_msg instead of echo for better init messages.
  + Added patch to check start-stop-daemon exit status, Thanks to
    Sergey B Kirpichev <skirpichev@gmail.com> (Closes: #695374).
* debian/po/ja.po:
  + Added new Japanese translation. Thanks to victory <victory.deb@gmail.com>
    (Closes: #692481).
* debian/po/pt_BR.po:
  + Added new Brazilian Portuguese translation. Thanks to
    Adriano Rafael Gomes <adrianorg@gmail.com> (Closes: #692481).

[ Cyril Lavier ]
* debian/rules
  + Added RealIP module in nginx-naxsi (Closes: #693302).
* debian/modules/nginx-cache-purge/
  + Updated nginx-cache-purge module with the 2.0 version.
* debian/modules/nginx-lua/
  + Updated nginx-lua module with the 0.7.8 version.
* debian/modules/nginx-echo/
  + Updated the nginx-echo module with the 0.41 version.
* debian/modules/headers-more-nginx-module/
  + Updated the Headers-more module with the 0.19 version.
* debian/modules/README.Modules-versions
  + Updated the current version of modules following the updates.

[ Michael Lustfield ]
* debian/conf/sites-available/default
  + Uncommented listen lines to make server block default.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# vim:set ft= ts=4 sw=4 et fdm=marker:
 
2
 
 
3
use lib 'lib';
 
4
use Test::Nginx::Socket;
 
5
use t::StapThread;
 
6
 
 
7
our $GCScript = $t::StapThread::GCScript;
 
8
our $StapScript = $t::StapThread::StapScript;
 
9
 
 
10
repeat_each(2);
 
11
 
 
12
plan tests => repeat_each() * (blocks() * 4 + 1);
 
13
 
 
14
$ENV{TEST_NGINX_RESOLVER} ||= '8.8.8.8';
 
15
$ENV{TEST_NGINX_MEMCACHED_PORT} ||= '11211';
 
16
 
 
17
#no_shuffle();
 
18
no_long_string();
 
19
run_tests();
 
20
 
 
21
__DATA__
 
22
 
 
23
=== TEST 1: simple user thread without I/O
 
24
--- config
 
25
    location /lua {
 
26
        rewrite_by_lua '
 
27
            function f()
 
28
                ngx.say("hello in thread")
 
29
            end
 
30
 
 
31
            ngx.say("before")
 
32
            ngx.thread.spawn(f)
 
33
            ngx.say("after")
 
34
        ';
 
35
        content_by_lua return;
 
36
    }
 
37
--- request
 
38
GET /lua
 
39
--- stap2 eval
 
40
<<'_EOC_' . $::StapScript;
 
41
 
 
42
F(ngx_http_lua_send_chain_link) {
 
43
    printf("send link %p\n", $in)
 
44
}
 
45
 
 
46
F(ngx_http_core_content_phase) {
 
47
    println("core content phase")
 
48
}
 
49
 
 
50
_EOC_
 
51
--- stap eval: $::GCScript
 
52
--- stap_out
 
53
create 2 in 1
 
54
spawn user thread 2 in 1
 
55
terminate 2: ok
 
56
terminate 1: ok
 
57
delete thread 2
 
58
delete thread 1
 
59
terminate 3: ok
 
60
delete thread 3
 
61
 
 
62
--- response_body
 
63
before
 
64
hello in thread
 
65
after
 
66
--- no_error_log
 
67
[error]
 
68
 
 
69
 
 
70
 
 
71
=== TEST 2: two simple user threads without I/O
 
72
--- config
 
73
    location /lua {
 
74
        rewrite_by_lua '
 
75
            function f()
 
76
                ngx.say("in thread 1")
 
77
            end
 
78
 
 
79
            function g()
 
80
                ngx.say("in thread 2")
 
81
            end
 
82
 
 
83
            ngx.say("before 1")
 
84
            ngx.thread.spawn(f)
 
85
            ngx.say("after 1")
 
86
 
 
87
            ngx.say("before 2")
 
88
            ngx.thread.spawn(g)
 
89
            ngx.say("after 2")
 
90
        ';
 
91
        content_by_lua return;
 
92
    }
 
93
--- request
 
94
GET /lua
 
95
--- stap2 eval: $::StapScript
 
96
--- stap eval: $::GCScript
 
97
--- stap_out
 
98
create 2 in 1
 
99
spawn user thread 2 in 1
 
100
terminate 2: ok
 
101
create 3 in 1
 
102
spawn user thread 3 in 1
 
103
terminate 3: ok
 
104
terminate 1: ok
 
105
delete thread 2
 
106
delete thread 3
 
107
delete thread 1
 
108
terminate 4: ok
 
109
delete thread 4
 
110
 
 
111
--- response_body
 
112
before 1
 
113
in thread 1
 
114
after 1
 
115
before 2
 
116
in thread 2
 
117
after 2
 
118
--- no_error_log
 
119
[error]
 
120
 
 
121
 
 
122
 
 
123
=== TEST 3: simple user thread with sleep
 
124
--- config
 
125
    location /lua {
 
126
        rewrite_by_lua '
 
127
            function f()
 
128
                ngx.say("before sleep")
 
129
                ngx.sleep(0.1)
 
130
                ngx.say("after sleep")
 
131
            end
 
132
 
 
133
            ngx.say("before thread create")
 
134
            ngx.thread.spawn(f)
 
135
            ngx.say("after thread create")
 
136
        ';
 
137
        content_by_lua return;
 
138
    }
 
139
--- request
 
140
GET /lua
 
141
--- stap2 eval: $::StapScript
 
142
--- stap eval: $::GCScript
 
143
--- stap_out
 
144
create 2 in 1
 
145
spawn user thread 2 in 1
 
146
terminate 1: ok
 
147
delete thread 1
 
148
terminate 2: ok
 
149
delete thread 2
 
150
terminate 3: ok
 
151
delete thread 3
 
152
 
 
153
--- response_body
 
154
before thread create
 
155
before sleep
 
156
after thread create
 
157
after sleep
 
158
--- no_error_log
 
159
[error]
 
160
 
 
161
 
 
162
 
 
163
=== TEST 4: two simple user threads with sleep
 
164
--- config
 
165
    location /lua {
 
166
        rewrite_by_lua '
 
167
            function f()
 
168
                ngx.say("1: before sleep")
 
169
                ngx.sleep(0.2)
 
170
                ngx.say("1: after sleep")
 
171
            end
 
172
 
 
173
            function g()
 
174
                ngx.say("2: before sleep")
 
175
                ngx.sleep(0.1)
 
176
                ngx.say("2: after sleep")
 
177
            end
 
178
 
 
179
            ngx.say("1: before thread create")
 
180
            ngx.thread.spawn(f)
 
181
            ngx.say("1: after thread create")
 
182
 
 
183
            ngx.say("2: before thread create")
 
184
            ngx.thread.spawn(g)
 
185
            ngx.say("2: after thread create")
 
186
        ';
 
187
        content_by_lua return;
 
188
    }
 
189
--- request
 
190
GET /lua
 
191
--- stap2 eval: $::StapScript
 
192
--- stap eval: $::GCScript
 
193
--- stap_out
 
194
create 2 in 1
 
195
spawn user thread 2 in 1
 
196
create 3 in 1
 
197
spawn user thread 3 in 1
 
198
terminate 1: ok
 
199
delete thread 1
 
200
terminate 3: ok
 
201
delete thread 3
 
202
terminate 2: ok
 
203
delete thread 2
 
204
terminate 4: ok
 
205
delete thread 4
 
206
 
 
207
--- response_body
 
208
1: before thread create
 
209
1: before sleep
 
210
1: after thread create
 
211
2: before thread create
 
212
2: before sleep
 
213
2: after thread create
 
214
2: after sleep
 
215
1: after sleep
 
216
--- no_error_log
 
217
[error]
 
218
 
 
219
 
 
220
 
 
221
=== TEST 5: error in user thread
 
222
--- config
 
223
    location /lua {
 
224
        rewrite_by_lua '
 
225
            function f()
 
226
                ngx.blah()
 
227
            end
 
228
 
 
229
            ngx.thread.spawn(f)
 
230
            ngx.say("after")
 
231
        ';
 
232
        content_by_lua return;
 
233
    }
 
234
--- request
 
235
GET /lua
 
236
--- stap2 eval: $::StapScript
 
237
--- stap eval: $::GCScript
 
238
--- stap_out
 
239
create 2 in 1
 
240
spawn user thread 2 in 1
 
241
terminate 2: fail
 
242
terminate 1: ok
 
243
delete thread 2
 
244
delete thread 1
 
245
terminate 3: ok
 
246
delete thread 3
 
247
 
 
248
--- response_body
 
249
after
 
250
--- error_log
 
251
lua user thread aborted: runtime error: [string "rewrite_by_lua"]:3: attempt to call field 'blah' (a nil value)
 
252
 
 
253
 
 
254
 
 
255
=== TEST 6: simple user threads doing a single subrequest (entry quits early)
 
256
--- config
 
257
    location /lua {
 
258
        rewrite_by_lua '
 
259
            function f()
 
260
                ngx.say("before capture")
 
261
                res = ngx.location.capture("/proxy")
 
262
                ngx.say("after capture: ", res.body)
 
263
            end
 
264
 
 
265
            ngx.say("before thread create")
 
266
            ngx.thread.spawn(f)
 
267
            ngx.say("after thread create")
 
268
        ';
 
269
        content_by_lua return;
 
270
    }
 
271
 
 
272
    location /proxy {
 
273
        proxy_pass http://127.0.0.1:$server_port/foo;
 
274
    }
 
275
 
 
276
    location /foo {
 
277
        echo_sleep 0.1;
 
278
        echo -n hello world;
 
279
    }
 
280
--- request
 
281
GET /lua
 
282
--- stap2 eval: $::StapScript
 
283
--- stap eval: $::GCScript
 
284
--- stap_out
 
285
create 2 in 1
 
286
spawn user thread 2 in 1
 
287
terminate 1: ok
 
288
delete thread 1
 
289
terminate 2: ok
 
290
delete thread 2
 
291
terminate 3: ok
 
292
delete thread 3
 
293
 
 
294
--- response_body
 
295
before thread create
 
296
before capture
 
297
after thread create
 
298
after capture: hello world
 
299
--- no_error_log
 
300
[error]
 
301
 
 
302
 
 
303
 
 
304
=== TEST 7: simple user threads doing a single subrequest (entry also does a subrequest and quits early)
 
305
--- config
 
306
    location /lua {
 
307
        rewrite_by_lua '
 
308
            function f()
 
309
                ngx.say("before capture")
 
310
                local res = ngx.location.capture("/proxy?foo")
 
311
                ngx.say("after capture: ", res.body)
 
312
            end
 
313
 
 
314
            ngx.say("before thread create")
 
315
            ngx.thread.spawn(f)
 
316
            ngx.say("after thread create")
 
317
            local res = ngx.location.capture("/proxy?bar")
 
318
            ngx.say("capture: ", res.body)
 
319
        ';
 
320
        content_by_lua return;
 
321
    }
 
322
 
 
323
    location /proxy {
 
324
        proxy_pass http://127.0.0.1:$server_port/$args;
 
325
    }
 
326
 
 
327
    location /foo {
 
328
        echo_sleep 0.1;
 
329
        echo -n hello foo;
 
330
    }
 
331
 
 
332
    location /bar {
 
333
        echo -n hello bar;
 
334
    }
 
335
--- request
 
336
GET /lua
 
337
--- stap2 eval: $::StapScript
 
338
--- stap eval: $::GCScript
 
339
--- stap_out
 
340
create 2 in 1
 
341
spawn user thread 2 in 1
 
342
terminate 1: ok
 
343
delete thread 1
 
344
terminate 2: ok
 
345
delete thread 2
 
346
terminate 3: ok
 
347
delete thread 3
 
348
 
 
349
--- response_body
 
350
before thread create
 
351
before capture
 
352
after thread create
 
353
capture: hello bar
 
354
after capture: hello foo
 
355
--- no_error_log
 
356
[error]
 
357
 
 
358
 
 
359
 
 
360
=== TEST 8: simple user threads doing a single subrequest (entry also does a subrequest and quits late)
 
361
--- config
 
362
    location /lua {
 
363
        rewrite_by_lua '
 
364
            function f()
 
365
                ngx.say("before capture")
 
366
                local res = ngx.location.capture("/proxy?foo")
 
367
                ngx.say("after capture: ", res.body)
 
368
            end
 
369
 
 
370
            ngx.say("before thread create")
 
371
            ngx.thread.spawn(f)
 
372
            ngx.say("after thread create")
 
373
            local res = ngx.location.capture("/proxy?bar")
 
374
            ngx.say("capture: ", res.body)
 
375
        ';
 
376
        content_by_lua return;
 
377
    }
 
378
 
 
379
    location /proxy {
 
380
        proxy_pass http://127.0.0.1:$server_port/$args;
 
381
    }
 
382
 
 
383
    location /foo {
 
384
        echo_sleep 0.1;
 
385
        echo -n hello foo;
 
386
    }
 
387
 
 
388
    location /bar {
 
389
        echo_sleep 0.2;
 
390
        echo -n hello bar;
 
391
    }
 
392
--- request
 
393
GET /lua
 
394
--- stap2 eval: $::StapScript
 
395
--- stap eval: $::GCScript
 
396
--- stap_out
 
397
create 2 in 1
 
398
spawn user thread 2 in 1
 
399
terminate 2: ok
 
400
terminate 1: ok
 
401
delete thread 2
 
402
delete thread 1
 
403
terminate 3: ok
 
404
delete thread 3
 
405
 
 
406
--- response_body
 
407
before thread create
 
408
before capture
 
409
after thread create
 
410
after capture: hello foo
 
411
capture: hello bar
 
412
--- no_error_log
 
413
[error]
 
414
 
 
415
 
 
416
 
 
417
=== TEST 9: two simple user threads doing single subrequests (entry also does a subrequest and quits between)
 
418
--- config
 
419
    location /lua {
 
420
        rewrite_by_lua '
 
421
            function f()
 
422
                ngx.say("f: before capture")
 
423
                local res = ngx.location.capture("/proxy?foo")
 
424
                ngx.say("f: after capture: ", res.body)
 
425
            end
 
426
 
 
427
            function g()
 
428
                ngx.say("g: before capture")
 
429
                local res = ngx.location.capture("/proxy?bah")
 
430
                ngx.say("g: after capture: ", res.body)
 
431
            end
 
432
 
 
433
            ngx.say("before thread 1 create")
 
434
            ngx.thread.spawn(f)
 
435
            ngx.say("after thread 1 create")
 
436
 
 
437
            ngx.say("before thread 2 create")
 
438
            ngx.thread.spawn(g)
 
439
            ngx.say("after thread 2 create")
 
440
 
 
441
            local res = ngx.location.capture("/proxy?bar")
 
442
            ngx.say("capture: ", res.body)
 
443
        ';
 
444
        content_by_lua return;
 
445
    }
 
446
 
 
447
    location /proxy {
 
448
        proxy_pass http://127.0.0.1:$server_port/$args;
 
449
    }
 
450
 
 
451
    location /foo {
 
452
        echo_sleep 0.1;
 
453
        echo -n hello foo;
 
454
    }
 
455
 
 
456
    location /bar {
 
457
        echo_sleep 0.2;
 
458
        echo -n hello bar;
 
459
    }
 
460
 
 
461
    location /bah {
 
462
        echo_sleep 0.3;
 
463
        echo -n hello bah;
 
464
    }
 
465
--- request
 
466
GET /lua
 
467
--- stap2 eval: $::StapScript
 
468
--- stap eval: $::GCScript
 
469
--- stap_out
 
470
create 2 in 1
 
471
spawn user thread 2 in 1
 
472
create 3 in 1
 
473
spawn user thread 3 in 1
 
474
terminate 2: ok
 
475
terminate 1: ok
 
476
delete thread 2
 
477
delete thread 1
 
478
terminate 3: ok
 
479
delete thread 3
 
480
terminate 4: ok
 
481
delete thread 4
 
482
 
 
483
--- response_body
 
484
before thread 1 create
 
485
f: before capture
 
486
after thread 1 create
 
487
before thread 2 create
 
488
g: before capture
 
489
after thread 2 create
 
490
f: after capture: hello foo
 
491
capture: hello bar
 
492
g: after capture: hello bah
 
493
--- no_error_log
 
494
[error]
 
495
 
 
496
 
 
497
 
 
498
=== TEST 10: nested user threads
 
499
--- config
 
500
    location /lua {
 
501
        rewrite_by_lua '
 
502
            function f()
 
503
                ngx.say("before g")
 
504
                ngx.thread.spawn(g)
 
505
                ngx.say("after g")
 
506
            end
 
507
 
 
508
            function g()
 
509
                ngx.say("hello in g()")
 
510
            end
 
511
 
 
512
            ngx.say("before f")
 
513
            ngx.thread.spawn(f)
 
514
            ngx.say("after f")
 
515
        ';
 
516
        content_by_lua return;
 
517
    }
 
518
--- request
 
519
GET /lua
 
520
--- stap2 eval: $::StapScript
 
521
--- stap eval: $::GCScript
 
522
--- stap_out
 
523
create 2 in 1
 
524
spawn user thread 2 in 1
 
525
create 3 in 2
 
526
spawn user thread 3 in 2
 
527
terminate 3: ok
 
528
terminate 1: ok
 
529
delete thread 1
 
530
terminate 2: ok
 
531
delete thread 3
 
532
delete thread 2
 
533
terminate 4: ok
 
534
delete thread 4
 
535
 
 
536
--- response_body
 
537
before f
 
538
before g
 
539
hello in g()
 
540
after f
 
541
after g
 
542
--- no_error_log
 
543
[error]
 
544
 
 
545
 
 
546
 
 
547
=== TEST 11: nested user threads (with I/O)
 
548
--- config
 
549
    location /lua {
 
550
        rewrite_by_lua '
 
551
            function f()
 
552
                ngx.say("before g")
 
553
                ngx.thread.spawn(g)
 
554
                ngx.say("after g")
 
555
            end
 
556
 
 
557
            function g()
 
558
                ngx.sleep(0.1)
 
559
                ngx.say("hello in g()")
 
560
            end
 
561
 
 
562
            ngx.say("before f")
 
563
            ngx.thread.spawn(f)
 
564
            ngx.say("after f")
 
565
        ';
 
566
        content_by_lua return;
 
567
    }
 
568
--- request
 
569
GET /lua
 
570
--- stap2 eval: $::StapScript
 
571
--- stap eval: $::GCScript
 
572
--- stap_out
 
573
create 2 in 1
 
574
spawn user thread 2 in 1
 
575
create 3 in 2
 
576
spawn user thread 3 in 2
 
577
terminate 1: ok
 
578
delete thread 1
 
579
terminate 2: ok
 
580
delete thread 2
 
581
terminate 3: ok
 
582
delete thread 3
 
583
terminate 4: ok
 
584
delete thread 4
 
585
 
 
586
--- response_body
 
587
before f
 
588
before g
 
589
after f
 
590
after g
 
591
hello in g()
 
592
--- no_error_log
 
593
[error]
 
594
 
 
595
 
 
596
 
 
597
=== TEST 12: coroutine status of a running user thread
 
598
--- config
 
599
    location /lua {
 
600
        rewrite_by_lua '
 
601
            local co
 
602
            function f()
 
603
                co = coroutine.running()
 
604
                ngx.sleep(0.1)
 
605
            end
 
606
 
 
607
            ngx.thread.spawn(f)
 
608
            ngx.say("status: ", coroutine.status(co))
 
609
        ';
 
610
        content_by_lua return;
 
611
    }
 
612
--- request
 
613
GET /lua
 
614
--- stap2 eval: $::StapScript
 
615
--- stap eval: $::GCScript
 
616
--- stap_out
 
617
create 2 in 1
 
618
spawn user thread 2 in 1
 
619
terminate 1: ok
 
620
delete thread 1
 
621
terminate 2: ok
 
622
delete thread 2
 
623
terminate 3: ok
 
624
delete thread 3
 
625
 
 
626
--- response_body
 
627
status: running
 
628
--- no_error_log
 
629
[error]
 
630
 
 
631
 
 
632
 
 
633
=== TEST 13: coroutine status of a dead user thread
 
634
--- config
 
635
    location /lua {
 
636
        rewrite_by_lua '
 
637
            local co
 
638
            function f()
 
639
                co = coroutine.running()
 
640
            end
 
641
 
 
642
            ngx.thread.spawn(f)
 
643
            ngx.say("status: ", coroutine.status(co))
 
644
        ';
 
645
        content_by_lua return;
 
646
    }
 
647
--- request
 
648
GET /lua
 
649
--- stap2 eval: $::StapScript
 
650
--- stap eval: $::GCScript
 
651
--- stap_out
 
652
create 2 in 1
 
653
spawn user thread 2 in 1
 
654
terminate 2: ok
 
655
terminate 1: ok
 
656
delete thread 2
 
657
delete thread 1
 
658
terminate 3: ok
 
659
delete thread 3
 
660
 
 
661
--- response_body
 
662
status: zombie
 
663
--- no_error_log
 
664
[error]
 
665
 
 
666
 
 
667
 
 
668
=== TEST 14: coroutine status of a "normal" user thread
 
669
--- config
 
670
    location /lua {
 
671
        rewrite_by_lua '
 
672
            local co
 
673
            function f()
 
674
                co = coroutine.running()
 
675
                local co2 = coroutine.create(g)
 
676
                coroutine.resume(co2)
 
677
            end
 
678
 
 
679
            function g()
 
680
                ngx.sleep(0.1)
 
681
            end
 
682
 
 
683
            ngx.thread.spawn(f)
 
684
            ngx.say("status: ", coroutine.status(co))
 
685
        ';
 
686
        content_by_lua return;
 
687
    }
 
688
--- request
 
689
GET /lua
 
690
--- stap2 eval: $::StapScript
 
691
--- stap eval: $::GCScript
 
692
--- stap_out
 
693
create 2 in 1
 
694
spawn user thread 2 in 1
 
695
create 3 in 2
 
696
terminate 1: ok
 
697
delete thread 1
 
698
terminate 3: ok
 
699
terminate 2: ok
 
700
delete thread 2
 
701
terminate 4: ok
 
702
delete thread 4
 
703
 
 
704
--- response_body
 
705
status: normal
 
706
--- no_error_log
 
707
[error]
 
708
 
 
709
 
 
710
 
 
711
=== TEST 15: creating user threads in a user coroutine
 
712
--- config
 
713
    location /lua {
 
714
        rewrite_by_lua '
 
715
            function f()
 
716
                ngx.say("before g")
 
717
                ngx.thread.spawn(g)
 
718
                ngx.say("after g")
 
719
            end
 
720
 
 
721
            function g()
 
722
                ngx.say("hello in g()")
 
723
            end
 
724
 
 
725
            ngx.say("before f")
 
726
            local co = coroutine.create(f)
 
727
            coroutine.resume(co)
 
728
            ngx.say("after f")
 
729
        ';
 
730
        content_by_lua return;
 
731
    }
 
732
--- request
 
733
GET /lua
 
734
--- stap2 eval: $::StapScript
 
735
--- stap eval: $::GCScript
 
736
--- stap_out
 
737
create 2 in 1
 
738
create 3 in 2
 
739
spawn user thread 3 in 2
 
740
terminate 3: ok
 
741
terminate 2: ok
 
742
delete thread 3
 
743
terminate 1: ok
 
744
delete thread 1
 
745
terminate 4: ok
 
746
delete thread 4
 
747
 
 
748
--- response_body
 
749
before f
 
750
before g
 
751
hello in g()
 
752
after g
 
753
after f
 
754
--- no_error_log
 
755
[error]
 
756
 
 
757
 
 
758
 
 
759
=== TEST 16: manual time slicing between a user thread and the entry thread
 
760
--- config
 
761
    location /lua {
 
762
        rewrite_by_lua '
 
763
            local yield = coroutine.yield
 
764
 
 
765
            function f()
 
766
                local self = coroutine.running()
 
767
                ngx.say("f 1")
 
768
                yield(self)
 
769
                ngx.say("f 2")
 
770
                yield(self)
 
771
                ngx.say("f 3")
 
772
            end
 
773
 
 
774
            local self = coroutine.running()
 
775
            ngx.say("0")
 
776
            yield(self)
 
777
            ngx.say("1")
 
778
            ngx.thread.spawn(f)
 
779
            ngx.say("2")
 
780
            yield(self)
 
781
            ngx.say("3")
 
782
            yield(self)
 
783
            ngx.say("4")
 
784
        ';
 
785
        content_by_lua return;
 
786
    }
 
787
--- request
 
788
GET /lua
 
789
--- stap2 eval: $::StapScript
 
790
--- stap eval: $::GCScript
 
791
--- stap_out
 
792
create 2 in 1
 
793
spawn user thread 2 in 1
 
794
terminate 2: ok
 
795
terminate 1: ok
 
796
delete thread 2
 
797
delete thread 1
 
798
terminate 3: ok
 
799
delete thread 3
 
800
 
 
801
--- response_body
 
802
0
 
803
1
 
804
f 1
 
805
2
 
806
f 2
 
807
3
 
808
f 3
 
809
4
 
810
--- no_error_log
 
811
[error]
 
812
 
 
813
 
 
814
 
 
815
=== TEST 17: manual time slicing between two user threads
 
816
--- config
 
817
    location /lua {
 
818
        rewrite_by_lua '
 
819
            local yield = coroutine.yield
 
820
 
 
821
            function f()
 
822
                local self = coroutine.running()
 
823
                ngx.say("f 1")
 
824
                yield(self)
 
825
                ngx.say("f 2")
 
826
                yield(self)
 
827
                ngx.say("f 3")
 
828
            end
 
829
 
 
830
            function g()
 
831
                local self = coroutine.running()
 
832
                ngx.say("g 1")
 
833
                yield(self)
 
834
                ngx.say("g 2")
 
835
                yield(self)
 
836
                ngx.say("g 3")
 
837
            end
 
838
 
 
839
            ngx.thread.spawn(f)
 
840
            ngx.thread.spawn(g)
 
841
            ngx.say("done")
 
842
        ';
 
843
        content_by_lua return;
 
844
    }
 
845
--- request
 
846
GET /lua
 
847
--- stap2 eval: $::StapScript
 
848
--- stap eval: $::GCScript
 
849
--- stap_out
 
850
create 2 in 1
 
851
spawn user thread 2 in 1
 
852
create 3 in 1
 
853
spawn user thread 3 in 1
 
854
terminate 1: ok
 
855
delete thread 1
 
856
terminate 2: ok
 
857
delete thread 2
 
858
terminate 3: ok
 
859
delete thread 3
 
860
terminate 4: ok
 
861
delete thread 4
 
862
 
 
863
--- response_body
 
864
f 1
 
865
g 1
 
866
f 2
 
867
done
 
868
g 2
 
869
f 3
 
870
g 3
 
871
--- no_error_log
 
872
[error]
 
873
 
 
874
 
 
875
 
 
876
=== TEST 18: entry thread and a user thread flushing at the same time
 
877
--- config
 
878
    location /lua {
 
879
        rewrite_by_lua '
 
880
            function f()
 
881
                ngx.say("hello in thread")
 
882
                coroutine.yield(coroutine.running)
 
883
                ngx.flush(true)
 
884
            end
 
885
 
 
886
            ngx.say("before")
 
887
            ngx.thread.spawn(f)
 
888
            ngx.say("after")
 
889
            ngx.flush(true)
 
890
        ';
 
891
        content_by_lua return;
 
892
    }
 
893
--- request
 
894
GET /lua
 
895
--- stap2 eval: $::StapScript
 
896
--- stap eval: $::GCScript
 
897
--- stap_out
 
898
create 2 in 1
 
899
spawn user thread 2 in 1
 
900
terminate 1: ok
 
901
delete thread 1
 
902
terminate 2: ok
 
903
delete thread 2
 
904
terminate 3: ok
 
905
delete thread 3
 
906
 
 
907
--- response_body
 
908
before
 
909
hello in thread
 
910
after
 
911
--- no_error_log
 
912
[error]
 
913
 
 
914
 
 
915
 
 
916
=== TEST 19: two user threads flushing at the same time
 
917
--- config
 
918
    location /lua {
 
919
        rewrite_by_lua '
 
920
            function f()
 
921
                ngx.say("hello from f")
 
922
                ngx.flush(true)
 
923
            end
 
924
 
 
925
            function g()
 
926
                ngx.say("hello from g")
 
927
                ngx.flush(true)
 
928
            end
 
929
 
 
930
            ngx.thread.spawn(f)
 
931
            ngx.thread.spawn(g)
 
932
        ';
 
933
        content_by_lua return;
 
934
    }
 
935
--- request
 
936
GET /lua
 
937
--- stap2 eval: $::StapScript
 
938
--- stap eval: $::GCScript
 
939
--- stap_out_like
 
940
^(?:create 2 in 1
 
941
spawn user thread 2 in 1
 
942
create 3 in 1
 
943
spawn user thread 3 in 1
 
944
terminate 1: ok
 
945
delete thread 1
 
946
terminate 2: ok
 
947
delete thread 2
 
948
terminate 3: ok
 
949
delete thread 3|create 2 in 1
 
950
spawn user thread 2 in 1
 
951
terminate 2: ok
 
952
create 3 in 1
 
953
spawn user thread 3 in 1
 
954
terminate 3: ok
 
955
terminate 1: ok
 
956
delete thread 2
 
957
delete thread 3
 
958
delete thread 1)
 
959
terminate 4: ok
 
960
delete thread 4$
 
961
 
 
962
--- response_body
 
963
hello from f
 
964
hello from g
 
965
--- no_error_log
 
966
[error]
 
967
 
 
968
 
 
969
 
 
970
=== TEST 20: user threads + ngx.socket.tcp
 
971
--- config
 
972
    location /lua {
 
973
        rewrite_by_lua '
 
974
            function f()
 
975
                local sock = ngx.socket.tcp()
 
976
                local ok, err = sock:connect("127.0.0.1", $TEST_NGINX_MEMCACHED_PORT)
 
977
                if not ok then
 
978
                    ngx.say("failed to connect: ", err)
 
979
                    return
 
980
                end
 
981
                local bytes, err = sock:send("flush_all\\r\\n")
 
982
                if not bytes then
 
983
                    ngx.say("failed to send query: ", err)
 
984
                    return
 
985
                end
 
986
 
 
987
                local line, err = sock:receive()
 
988
                if not line then
 
989
                    ngx.say("failed to receive: ", err)
 
990
                    return
 
991
                end
 
992
 
 
993
                ngx.say("received: ", line)
 
994
            end
 
995
 
 
996
            ngx.say("before")
 
997
            ngx.thread.spawn(f)
 
998
            ngx.say("after")
 
999
        ';
 
1000
        content_by_lua return;
 
1001
    }
 
1002
--- request
 
1003
GET /lua
 
1004
--- stap2 eval: $::StapScript
 
1005
--- stap eval: $::GCScript
 
1006
--- stap_out
 
1007
create 2 in 1
 
1008
spawn user thread 2 in 1
 
1009
terminate 1: ok
 
1010
delete thread 1
 
1011
terminate 2: ok
 
1012
delete thread 2
 
1013
terminate 3: ok
 
1014
delete thread 3
 
1015
 
 
1016
--- response_body
 
1017
before
 
1018
after
 
1019
received: OK
 
1020
--- no_error_log
 
1021
[error]
 
1022
 
 
1023
 
 
1024
 
 
1025
=== TEST 21: user threads + ngx.socket.udp
 
1026
--- config
 
1027
    location /lua {
 
1028
        rewrite_by_lua '
 
1029
            function f()
 
1030
                local sock = ngx.socket.udp()
 
1031
                local ok, err = sock:setpeername("127.0.0.1", 12345)
 
1032
                local bytes, err = sock:send("blah")
 
1033
                if not bytes then
 
1034
                    ngx.say("failed to send query: ", err)
 
1035
                    return
 
1036
                end
 
1037
 
 
1038
                local line, err = sock:receive()
 
1039
                if not line then
 
1040
                    ngx.say("failed to receive: ", err)
 
1041
                    return
 
1042
                end
 
1043
 
 
1044
                ngx.say("received: ", line)
 
1045
            end
 
1046
 
 
1047
            ngx.say("before")
 
1048
            ngx.thread.spawn(f)
 
1049
            ngx.say("after")
 
1050
        ';
 
1051
        content_by_lua return;
 
1052
    }
 
1053
--- request
 
1054
GET /lua
 
1055
--- stap2 eval: $::StapScript
 
1056
--- stap eval: $::GCScript
 
1057
--- stap_out_like chop
 
1058
^(?:create 2 in 1
 
1059
spawn user thread 2 in 1
 
1060
terminate 1: ok
 
1061
delete thread 1
 
1062
terminate 2: ok
 
1063
delete thread 2
 
1064
terminate 3: ok
 
1065
delete thread 3
 
1066
|create 2 in 1
 
1067
spawn user thread 2 in 1
 
1068
terminate 2: ok
 
1069
terminate 1: ok
 
1070
delete thread 2
 
1071
delete thread 1
 
1072
terminate 3: ok
 
1073
delete thread 3)$
 
1074
 
 
1075
--- udp_listen: 12345
 
1076
--- udp_query: blah
 
1077
--- udp_reply: hello udp
 
1078
--- response_body_like chop
 
1079
^(?:before
 
1080
after
 
1081
received: hello udp
 
1082
|before
 
1083
received: hello udp
 
1084
after)$
 
1085
 
 
1086
--- no_error_log
 
1087
[error]
 
1088
 
 
1089
 
 
1090
 
 
1091
=== TEST 22: simple user thread with ngx.req.read_body()
 
1092
--- config
 
1093
    location /lua {
 
1094
        rewrite_by_lua '
 
1095
            function f()
 
1096
                ngx.req.read_body()
 
1097
                local body = ngx.req.get_body_data()
 
1098
                ngx.say("body: ", body)
 
1099
            end
 
1100
 
 
1101
            ngx.say("before")
 
1102
            ngx.thread.spawn(f)
 
1103
            ngx.say("after")
 
1104
        ';
 
1105
        content_by_lua return;
 
1106
    }
 
1107
--- request
 
1108
POST /lua
 
1109
hello world
 
1110
--- stap2 eval: $::StapScript
 
1111
--- stap eval: $::GCScript
 
1112
--- stap_out_like chop
 
1113
^(?:create 2 in 1
 
1114
spawn user thread 2 in 1
 
1115
terminate 2: ok
 
1116
terminate 1: ok
 
1117
delete thread 2
 
1118
delete thread 1|create 2 in 1
 
1119
spawn user thread 2 in 1
 
1120
terminate 1: ok
 
1121
delete thread 1
 
1122
terminate 2: ok
 
1123
delete thread 2)
 
1124
terminate 3: ok
 
1125
delete thread 3$
 
1126
 
 
1127
--- response_body_like chop
 
1128
^(?:before
 
1129
body: hello world
 
1130
after|before
 
1131
after
 
1132
body: hello world)$
 
1133
 
 
1134
--- no_error_log
 
1135
[error]
 
1136
 
 
1137
 
 
1138
 
 
1139
=== TEST 23: simple user thread with ngx.req.socket()
 
1140
--- config
 
1141
    location /lua {
 
1142
        rewrite_by_lua '
 
1143
            function f()
 
1144
                local sock = ngx.req.socket()
 
1145
                local body, err = sock:receive(11)
 
1146
                if not body then
 
1147
                    ngx.say("failed to read body: ", err)
 
1148
                    return
 
1149
                end
 
1150
 
 
1151
                ngx.say("body: ", body)
 
1152
            end
 
1153
 
 
1154
            ngx.say("before")
 
1155
            ngx.thread.spawn(f)
 
1156
            ngx.say("after")
 
1157
        ';
 
1158
        content_by_lua return;
 
1159
    }
 
1160
--- request
 
1161
POST /lua
 
1162
hello world
 
1163
--- stap2 eval: $::StapScript
 
1164
--- stap eval: $::GCScript
 
1165
--- stap_out_like chop
 
1166
^(?:create 2 in 1
 
1167
spawn user thread 2 in 1
 
1168
terminate 2: ok
 
1169
terminate 1: ok
 
1170
delete thread 2
 
1171
delete thread 1|create 2 in 1
 
1172
spawn user thread 2 in 1
 
1173
terminate 1: ok
 
1174
delete thread 1
 
1175
terminate 2: ok
 
1176
delete thread 2)
 
1177
terminate 3: ok
 
1178
delete thread 3$
 
1179
 
 
1180
--- response_body_like chop
 
1181
^(?:before
 
1182
body: hello world
 
1183
after|before
 
1184
after
 
1185
body: hello world)$
 
1186
 
 
1187
--- no_error_log
 
1188
[error]
 
1189
 
 
1190
 
 
1191
 
 
1192
=== TEST 24: multiple user threads + subrequests returning 404 immediately
 
1193
--- config
 
1194
    location /t {
 
1195
        rewrite_by_lua '
 
1196
            local capture = ngx.location.capture
 
1197
            local insert = table.insert
 
1198
 
 
1199
            local function f(i)
 
1200
                local res = capture("/proxy/" .. i)
 
1201
                ngx.say("status: ", res.status)
 
1202
            end
 
1203
 
 
1204
            local threads = {}
 
1205
            for i = 1, 2 do
 
1206
                local co = ngx.thread.spawn(f, i)
 
1207
                insert(threads, co)
 
1208
            end
 
1209
 
 
1210
            ngx.say("ok")
 
1211
        ';
 
1212
        content_by_lua return;
 
1213
    }
 
1214
 
 
1215
    location ~ ^/proxy/(\d+) {
 
1216
        return 404;
 
1217
    }
 
1218
--- request
 
1219
    GET /t
 
1220
--- stap2 eval: $::StapScript
 
1221
--- stap eval
 
1222
"$::GCScript"
 
1223
.
 
1224
'
 
1225
F(ngx_http_finalize_request) {
 
1226
    printf("finalize request %s: rc:%d c:%d a:%d\n", ngx_http_req_uri($r), $rc, $r->main->count, $r == $r->main);
 
1227
    #if ($rc == -1) {
 
1228
        #print_ubacktrace()
 
1229
    #}
 
1230
}
 
1231
 
 
1232
M(http-subrequest-done) {
 
1233
    printf("subrequest %s done\n", ngx_http_req_uri($r))
 
1234
}
 
1235
 
 
1236
F(ngx_http_lua_post_subrequest) {
 
1237
    printf("post subreq: %s rc=%d, status=%d a=%d\n", ngx_http_req_uri($r), $rc,
 
1238
         $r->headers_out->status, $r == $r->main)
 
1239
    #print_ubacktrace()
 
1240
}
 
1241
'
 
1242
--- stap_out_like chop
 
1243
^create 2 in 1
 
1244
spawn user thread 2 in 1
 
1245
create 3 in 1
 
1246
spawn user thread 3 in 1
 
1247
terminate 1: ok
 
1248
delete thread 1
 
1249
finalize request /proxy/1: rc:404 c:3 a:0
 
1250
post subreq: /proxy/1 rc=404, status=0 a=0
 
1251
subrequest /proxy/1 done
 
1252
terminate 2: ok
 
1253
delete thread 2
 
1254
finalize request /proxy/2: rc:404 c:2 a:0
 
1255
post subreq: /proxy/2 rc=404, status=0 a=0
 
1256
subrequest /proxy/2 done
 
1257
terminate 3: ok
 
1258
delete thread 3
 
1259
terminate 4: ok
 
1260
delete thread 4
 
1261
finalize request /t: rc:0 c:1 a:1
 
1262
(?:finalize request /t: rc:0 c:1 a:1)?$
 
1263
 
 
1264
--- response_body
 
1265
ok
 
1266
status: 404
 
1267
status: 404
 
1268
--- no_error_log
 
1269
[error]
 
1270
--- timeout: 3
 
1271
 
 
1272
 
 
1273
 
 
1274
=== TEST 25: multiple user threads + subrequests returning 404 remotely (no wait)
 
1275
--- config
 
1276
    location /t {
 
1277
        rewrite_by_lua '
 
1278
            local capture = ngx.location.capture
 
1279
            local insert = table.insert
 
1280
 
 
1281
            local function f(i)
 
1282
                local res = capture("/proxy/" .. i)
 
1283
                ngx.say("status: ", res.status)
 
1284
            end
 
1285
 
 
1286
            local threads = {}
 
1287
            for i = 1, 5 do
 
1288
                local co = ngx.thread.spawn(f, i)
 
1289
                insert(threads, co)
 
1290
            end
 
1291
 
 
1292
            ngx.say("ok")
 
1293
        ';
 
1294
        content_by_lua return;
 
1295
    }
 
1296
 
 
1297
    location ~ ^/proxy/(\d+) {
 
1298
        proxy_pass http://127.0.0.1:$server_port/d/$1;
 
1299
    }
 
1300
 
 
1301
    location /d {
 
1302
        return 404;
 
1303
        #echo $uri;
 
1304
    }
 
1305
--- request
 
1306
    GET /t
 
1307
--- stap2 eval: $::StapScript
 
1308
--- stap eval: $::GCScript
 
1309
--- stap_out_like chop
 
1310
^create 2 in 1
 
1311
spawn user thread 2 in 1
 
1312
create 3 in 1
 
1313
spawn user thread 3 in 1
 
1314
create 4 in 1
 
1315
spawn user thread 4 in 1
 
1316
create 5 in 1
 
1317
spawn user thread 5 in 1
 
1318
create 6 in 1
 
1319
spawn user thread 6 in 1
 
1320
terminate 1: ok
 
1321
delete thread 1
 
1322
(?:terminate 2: ok
 
1323
delete thread 2
 
1324
terminate 3: ok
 
1325
delete thread 3
 
1326
terminate 4: ok
 
1327
delete thread 4
 
1328
terminate 5: ok
 
1329
delete thread 5
 
1330
terminate 6: ok
 
1331
delete thread 6|terminate 6: ok
 
1332
delete thread 6
 
1333
terminate 5: ok
 
1334
delete thread 5
 
1335
terminate 4: ok
 
1336
delete thread 4
 
1337
terminate 3: ok
 
1338
delete thread 3
 
1339
terminate 2: ok
 
1340
delete thread 2)
 
1341
terminate 7: ok
 
1342
delete thread 7
 
1343
 
 
1344
--- response_body
 
1345
ok
 
1346
status: 404
 
1347
status: 404
 
1348
status: 404
 
1349
status: 404
 
1350
status: 404
 
1351
--- no_error_log
 
1352
[error]
 
1353
--- timeout: 6
 
1354
 
 
1355
 
 
1356
 
 
1357
=== TEST 26: multiple user threads + subrequests returning 201 immediately
 
1358
--- config
 
1359
    location /t {
 
1360
        rewrite_by_lua '
 
1361
            local capture = ngx.location.capture
 
1362
            local insert = table.insert
 
1363
 
 
1364
            local function f(i)
 
1365
                local res = capture("/proxy/" .. i)
 
1366
                ngx.say("status: ", res.status)
 
1367
            end
 
1368
 
 
1369
            local threads = {}
 
1370
            for i = 1, 2 do
 
1371
                local co = ngx.thread.spawn(f, i)
 
1372
                insert(threads, co)
 
1373
            end
 
1374
 
 
1375
            ngx.say("ok")
 
1376
        ';
 
1377
        content_by_lua return;
 
1378
    }
 
1379
 
 
1380
    location ~ ^/proxy/(\d+) {
 
1381
        content_by_lua 'ngx.exit(201)';
 
1382
    }
 
1383
--- request
 
1384
    GET /t
 
1385
--- stap2 eval: $::StapScript
 
1386
--- stap eval
 
1387
"$::GCScript"
 
1388
.
 
1389
'
 
1390
F(ngx_http_finalize_request) {
 
1391
    printf("finalize request %s: rc:%d c:%d a:%d\n", ngx_http_req_uri($r), $rc, $r->main->count, $r == $r->main);
 
1392
    #if ($rc == -1) {
 
1393
        #print_ubacktrace()
 
1394
    #}
 
1395
}
 
1396
 
 
1397
M(http-subrequest-done) {
 
1398
    printf("subrequest %s done\n", ngx_http_req_uri($r))
 
1399
}
 
1400
 
 
1401
F(ngx_http_lua_post_subrequest) {
 
1402
    printf("post subreq: %s rc=%d, status=%d a=%d\n", ngx_http_req_uri($r), $rc,
 
1403
         $r->headers_out->status, $r == $r->main)
 
1404
    #print_ubacktrace()
 
1405
}
 
1406
'
 
1407
--- stap_out_like chop
 
1408
^create 2 in 1
 
1409
spawn user thread 2 in 1
 
1410
create 3 in 1
 
1411
spawn user thread 3 in 1
 
1412
terminate 1: ok
 
1413
delete thread 1
 
1414
terminate 4: ok
 
1415
delete thread 4
 
1416
finalize request /proxy/1: rc:201 c:3 a:0
 
1417
post subreq: /proxy/1 rc=201, status=201 a=0
 
1418
subrequest /proxy/1 done
 
1419
terminate 2: ok
 
1420
delete thread 2
 
1421
terminate 5: ok
 
1422
delete thread 5
 
1423
finalize request /proxy/2: rc:201 c:2 a:0
 
1424
post subreq: /proxy/2 rc=201, status=201 a=0
 
1425
subrequest /proxy/2 done
 
1426
terminate 3: ok
 
1427
delete thread 3
 
1428
terminate 6: ok
 
1429
delete thread 6
 
1430
finalize request /t: rc:0 c:1 a:1
 
1431
(?:finalize request /t: rc:0 c:1 a:1)?$
 
1432
 
 
1433
--- response_body
 
1434
ok
 
1435
status: 201
 
1436
status: 201
 
1437
--- no_error_log
 
1438
[error]
 
1439
--- timeout: 3
 
1440
 
 
1441
 
 
1442
 
 
1443
=== TEST 27: multiple user threads + subrequests returning 204 immediately
 
1444
--- config
 
1445
    location /t {
 
1446
        rewrite_by_lua '
 
1447
            local capture = ngx.location.capture
 
1448
            local insert = table.insert
 
1449
 
 
1450
            local function f(i)
 
1451
                local res = capture("/proxy/" .. i)
 
1452
                ngx.say("status: ", res.status)
 
1453
            end
 
1454
 
 
1455
            local threads = {}
 
1456
            for i = 1, 2 do
 
1457
                local co = ngx.thread.spawn(f, i)
 
1458
                insert(threads, co)
 
1459
            end
 
1460
 
 
1461
            ngx.say("ok")
 
1462
        ';
 
1463
        content_by_lua return;
 
1464
    }
 
1465
 
 
1466
    location ~ ^/proxy/(\d+) {
 
1467
        content_by_lua 'ngx.exit(204)';
 
1468
    }
 
1469
--- request
 
1470
    GET /t
 
1471
--- stap2 eval: $::StapScript
 
1472
--- stap eval
 
1473
"$::GCScript"
 
1474
.
 
1475
'
 
1476
F(ngx_http_finalize_request) {
 
1477
    printf("finalize request %s: rc:%d c:%d a:%d\n", ngx_http_req_uri($r), $rc, $r->main->count, $r == $r->main);
 
1478
    #if ($rc == -1) {
 
1479
        #print_ubacktrace()
 
1480
    #}
 
1481
}
 
1482
 
 
1483
M(http-subrequest-done) {
 
1484
    printf("subrequest %s done\n", ngx_http_req_uri($r))
 
1485
}
 
1486
 
 
1487
F(ngx_http_lua_post_subrequest) {
 
1488
    printf("post subreq: %s rc=%d, status=%d a=%d\n", ngx_http_req_uri($r), $rc,
 
1489
         $r->headers_out->status, $r == $r->main)
 
1490
    #print_ubacktrace()
 
1491
}
 
1492
'
 
1493
 
 
1494
--- stap_out_like chop
 
1495
^create 2 in 1
 
1496
spawn user thread 2 in 1
 
1497
create 3 in 1
 
1498
spawn user thread 3 in 1
 
1499
terminate 1: ok
 
1500
delete thread 1
 
1501
terminate 4: ok
 
1502
delete thread 4
 
1503
finalize request /proxy/1: rc:204 c:3 a:0
 
1504
post subreq: /proxy/1 rc=204, status=204 a=0
 
1505
subrequest /proxy/1 done
 
1506
terminate 2: ok
 
1507
delete thread 2
 
1508
terminate 5: ok
 
1509
delete thread 5
 
1510
finalize request /proxy/2: rc:204 c:2 a:0
 
1511
post subreq: /proxy/2 rc=204, status=204 a=0
 
1512
subrequest /proxy/2 done
 
1513
terminate 3: ok
 
1514
delete thread 3
 
1515
terminate 6: ok
 
1516
delete thread 6
 
1517
finalize request /t: rc:0 c:1 a:1
 
1518
(?:finalize request /t: rc:0 c:1 a:1)?$
 
1519
 
 
1520
--- response_body
 
1521
ok
 
1522
status: 204
 
1523
status: 204
 
1524
--- no_error_log
 
1525
[error]
 
1526
--- timeout: 3
 
1527