File tree 2 files changed +40
-0
lines changed
2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -30,3 +30,23 @@ GET /lua
30
30
workers: 1
31
31
--- no_error_log
32
32
[error]
33
+
34
+
35
+
36
+ === TEST 2: init_by_lua
37
+ --- http_config
38
+ init_by_lua_block {
39
+ package.loaded.count = ngx.worker.count()
40
+ }
41
+ --- config
42
+ location /lua {
43
+ content_by_lua_block {
44
+ ngx.say("workers: ", package.loaded.count)
45
+ }
46
+ }
47
+ --- request
48
+ GET /lua
49
+ --- response_body
50
+ workers: 1
51
+ --- no_error_log
52
+ [error]
Original file line number Diff line number Diff line change @@ -30,3 +30,23 @@ GET /lua
30
30
worker count: 5
31
31
--- no_error_log
32
32
[error]
33
+
34
+
35
+
36
+ === TEST 2: init_by_lua
37
+ --- http_config
38
+ init_by_lua_block {
39
+ package.loaded.count = ngx.worker.count()
40
+ }
41
+ --- config
42
+ location /lua {
43
+ content_by_lua_block {
44
+ ngx.say("workers: ", package.loaded.count)
45
+ }
46
+ }
47
+ --- request
48
+ GET /lua
49
+ --- response_body
50
+ workers: 5
51
+ --- no_error_log
52
+ [error]
You can’t perform that action at this time.
0 commit comments