~spuul/nginx/trunk

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/t/100-client-abort.t

  • Committer: Package Import Robot
  • Author(s): Christos Trochalakis, Christos Trochalakis
  • Date: 2014-02-13 11:41:49 UTC
  • mfrom: (1.3.32)
  • mto: This revision was merged to the branch mainline in revision 72.
  • Revision ID: package-import@ubuntu.com-20140213114149-tkp78c45rzu3wr6y
Tags: 1.4.5-1
[ Christos Trochalakis ]
* New upstream release.
* debian/modules/nginx-lua:
  + Update nginx-lua to v0.9.4
* debian/nginx-naxsi-ui.preinst:
  + Fix exit status issue (Closes: #735152)
* debian/control:
  + Fix arch:all to arch:any dependencies
  + Make nginx depend on specific flavor version
* debian/nginx-*.postinst:
  + Make nginx start by default (Closes: #735551)
* debian/nginx-*.prerm:
  + No need to check for invoke-rc.d,
    correctly set the exit code on error
* debian/nginx-common.nginx.init:
  + Rewrite some parts of the initscript
  + Introduce rotate command
  + Introduce upgrade command

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# vim:set ft= ts=4 sw=4 et fdm=marker:
2
2
 
3
3
use lib 'lib';
4
 
use Test::Nginx::Socket;
 
4
use Test::Nginx::Socket::Lua;
5
5
use t::StapThread;
6
6
 
7
7
our $GCScript = <<_EOC_;
20
20
 
21
21
repeat_each(2);
22
22
 
23
 
plan tests => repeat_each() * (blocks() * 3);
 
23
plan tests => repeat_each() * (blocks() * 3 + 1);
24
24
 
25
25
$ENV{TEST_NGINX_RESOLVER} ||= '8.8.8.8';
26
26
$ENV{TEST_NGINX_MEMCACHED_PORT} ||= '11211';
921
921
[error]
922
922
[alert]
923
923
 
 
924
 
 
925
 
 
926
=== TEST 27: ngx.say
 
927
--- config
 
928
    location /t {
 
929
        postpone_output 1;
 
930
        content_by_lua '
 
931
            ngx.sleep(0.2)
 
932
            local ok, err = ngx.say("hello")
 
933
            if not ok then
 
934
                ngx.log(ngx.WARN, "say failed: ", err)
 
935
                return
 
936
            end
 
937
        ';
 
938
    }
 
939
--- request
 
940
GET /t
 
941
 
 
942
--- wait: 0.2
 
943
--- timeout: 0.1
 
944
--- abort
 
945
--- ignore_response
 
946
--- no_error_log
 
947
[error]
 
948
[alert]
 
949
--- error_log
 
950
say failed: nginx output filter error
 
951
 
 
952
 
 
953
 
 
954
=== TEST 28: ngx.print
 
955
--- config
 
956
    location /t {
 
957
        postpone_output 1;
 
958
        content_by_lua '
 
959
            ngx.sleep(0.2)
 
960
            local ok, err = ngx.print("hello")
 
961
            if not ok then
 
962
                ngx.log(ngx.WARN, "print failed: ", err)
 
963
                return
 
964
            end
 
965
        ';
 
966
    }
 
967
--- request
 
968
GET /t
 
969
 
 
970
--- wait: 0.2
 
971
--- timeout: 0.1
 
972
--- abort
 
973
--- ignore_response
 
974
--- no_error_log
 
975
[error]
 
976
[alert]
 
977
--- error_log
 
978
print failed: nginx output filter error
 
979
 
 
980
 
 
981
 
 
982
=== TEST 29: ngx.send_headers
 
983
--- config
 
984
    location /t {
 
985
        postpone_output 1;
 
986
        content_by_lua '
 
987
            ngx.sleep(0.2)
 
988
            local ok, err = ngx.send_headers()
 
989
            if not ok then
 
990
                ngx.log(ngx.WARN, "send headers failed: ", err)
 
991
                return
 
992
            end
 
993
            ngx.log(ngx.WARN, "send headers succeeded")
 
994
        ';
 
995
    }
 
996
--- request
 
997
GET /t
 
998
 
 
999
--- wait: 0.2
 
1000
--- timeout: 0.1
 
1001
--- abort
 
1002
--- ignore_response
 
1003
--- no_error_log
 
1004
[error]
 
1005
[alert]
 
1006
--- error_log
 
1007
send headers succeeded
 
1008
 
 
1009
 
 
1010
 
 
1011
=== TEST 30: ngx.flush
 
1012
--- config
 
1013
    location /t {
 
1014
        #postpone_output 1;
 
1015
        content_by_lua '
 
1016
            ngx.say("hello")
 
1017
            ngx.sleep(0.2)
 
1018
            local ok, err = ngx.flush()
 
1019
            if not ok then
 
1020
                ngx.log(ngx.WARN, "flush failed: ", err)
 
1021
                return
 
1022
            end
 
1023
            ngx.log(ngx.WARN, "flush succeeded")
 
1024
        ';
 
1025
    }
 
1026
--- request
 
1027
GET /t
 
1028
 
 
1029
--- wait: 0.2
 
1030
--- timeout: 0.1
 
1031
--- abort
 
1032
--- ignore_response
 
1033
--- no_error_log
 
1034
[error]
 
1035
[alert]
 
1036
--- error_log
 
1037
flush succeeded
 
1038
 
 
1039
 
 
1040
 
 
1041
=== TEST 31: ngx.eof
 
1042
--- config
 
1043
    location /t {
 
1044
        postpone_output 1;
 
1045
        content_by_lua '
 
1046
            ngx.sleep(0.2)
 
1047
            local ok, err = ngx.eof()
 
1048
            if not ok then
 
1049
                ngx.log(ngx.WARN, "eof failed: ", err)
 
1050
                return
 
1051
            end
 
1052
            ngx.log(ngx.WARN, "eof succeeded")
 
1053
        ';
 
1054
    }
 
1055
--- request
 
1056
GET /t
 
1057
 
 
1058
--- wait: 0.2
 
1059
--- timeout: 0.1
 
1060
--- abort
 
1061
--- ignore_response
 
1062
--- no_error_log
 
1063
[error]
 
1064
[alert]
 
1065
eof succeeded
 
1066
--- error_log
 
1067
eof failed: nginx output filter error
 
1068