--- /dev/null
+# test that 2 seconds timeout does not occur while server writes for 4 seconds
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&http_client,
+ len => 5,
+ method => "GET",
+ timefile => "",
+ },
+ relayd => {
+ relay => [ "session timeout 2" ],
+ loggrep => { qr/(buffer event|splice) timeout/ => 0 },
+ },
+ server => {
+ func => \&http_server,
+ sleep => 1,
+ method => "GET",
+ },
+ len => 5,
+);
+
+1;
--- /dev/null
+# test that 2 seconds timeout does not occur while server writes for 4 seconds
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&http_client,
+ len => 5,
+ method => "GET",
+ timefile => "",
+ ssl => 1,
+ loggrep => 'Issuer.*/OU=relayd/',
+ },
+ relayd => {
+ relay => [ "session timeout 2" ],
+ loggrep => { qr/buffer event timeout/ => 0 },
+ forwardssl => 1,
+ listenssl => 1,
+ },
+ server => {
+ func => \&http_server,
+ sleep => 1,
+ method => "GET",
+ ssl => 1,
+ },
+ len => 5,
+);
+
+1;
--- /dev/null
+# test that 2 seconds timeout does not occur while server writes for 4 seconds
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&read_char,
+ timefile => "",
+ ssl => 1,
+ loggrep => 'Issuer.*/OU=relayd/',
+ },
+ relayd => {
+ relay => [ "session timeout 2" ],
+ loggrep => { qr/buffer event timeout/ => 0 },
+ forwardssl => 1,
+ listenssl => 1,
+ },
+ server => {
+ func => \&write_char,
+ len => 5,
+ sleep => 1,
+ ssl => 1,
+ },
+ len => 5,
+);
+
+1;
--- /dev/null
+# test that 2 seconds timeout does not occur while server writes for 4 seconds
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&read_char,
+ timefile => "",
+ },
+ relayd => {
+ relay => [ "session timeout 2" ],
+ loggrep => { qr/(buffer event|splice) timeout/ => 0 },
+ },
+ server => {
+ func => \&write_char,
+ len => 5,
+ sleep => 1,
+ },
+ len => 5,
+);
+
+1;
relayd => {
protocol => [ "http" ],
relay => [ "session timeout 3" ],
+ loggrep => { qr/(buffer event|splice) timeout/ => 0 },
},
server => {
func => sub {
--- /dev/null
+# test that 3 seconds timeout does not occur within 2 seconds idle in http
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&http_client,
+ len => 5,
+ timefile => "",
+ ssl => 1,
+ loggrep => 'Issuer.*/OU=relayd/',
+ },
+ relayd => {
+ protocol => [ "http" ],
+ relay => [ "session timeout 3" ],
+ loggrep => { qr/buffer event timeout/ => 0 },
+ forwardssl => 1,
+ listenssl => 1,
+ },
+ server => {
+ func => sub {
+ errignore();
+ http_server(@_);
+ sleep 2;
+ write_char(@_, 4);
+ },
+ sleep => 1,
+ nocheck => 1,
+ ssl => 1,
+ },
+ len => 9,
+);
+
+1;
--- /dev/null
+# test that 3 seconds timeout does not occur within 2 seconds idle
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => sub {
+ errignore();
+ write_char(@_, 5);
+ sleep 2;
+ write_char(@_, 4);
+ },
+ sleep => 1,
+ timefile => "",
+ nocheck => 1,
+ ssl => 1,
+ loggrep => 'Issuer.*/OU=relayd/',
+ },
+ relayd => {
+ relay => [ "session timeout 3" ],
+ loggrep => { qr/buffer event timeout/ => 0 },
+ forwardssl => 1,
+ listenssl => 1,
+ },
+ server => {
+ ssl => 1,
+ },
+ len => 9,
+);
+
+1;
},
relayd => {
relay => [ "session timeout 3" ],
+ loggrep => { qr/(buffer event|splice) timeout/ => 0 },
},
len => 9,
);
relayd => {
protocol => [ "http" ],
relay => [ "session timeout 3" ],
+ loggrep => { qr/(buffer event|splice) timeout/ => 1 },
},
server => {
func => sub {
--- /dev/null
+# test that 3 seconds timeout occurs within 4 seconds idle in http
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&http_client,
+ len => 5,
+ timefile => "",
+ ssl => 1,
+ loggrep => 'Issuer.*/OU=relayd/',
+ },
+ relayd => {
+ protocol => [ "http" ],
+ relay => [ "session timeout 3" ],
+ loggrep => { qr/buffer event timeout/ => 1 },
+ forwardssl => 1,
+ listenssl => 1,
+ },
+ server => {
+ func => sub {
+ errignore();
+ http_server(@_);
+ sleep 4;
+ write_char(@_, 4);
+ },
+ sleep => 1,
+ down => "Broken pipe",
+ nocheck => 1,
+ ssl => 1,
+ },
+ len => 5,
+);
+
+1;
--- /dev/null
+# test that 3 seconds timeout occurs within 4 seconds idle
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => sub {
+ errignore();
+ write_char(@_, 5);
+ sleep 4;
+ write_char(@_, 4);
+ },
+ sleep => 1,
+ down => "Broken pipe",
+ timefile => "",
+ nocheck => 1,
+ ssl => 1,
+ loggrep => 'Issuer.*/OU=relayd/',
+ },
+ relayd => {
+ relay => [ "session timeout 3" ],
+ loggrep => { qr/buffer event timeout/ => 1 },
+ forwardssl => 1,
+ listenssl => 1,
+ },
+ server => {
+ ssl => 1,
+ },
+ len => 5,
+);
+
+1;
},
relayd => {
relay => [ "session timeout 3" ],
+ loggrep => { qr/(buffer event|splice) timeout/ => 1 },
},
len => 5,
);
--- /dev/null
+# test that 2 seconds timeout does not occur while client writes for 4 seconds
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&http_client,
+ len => 5,
+ sleep => 1,
+ method => "PUT",
+ timefile => "",
+ },
+ relayd => {
+ relay => [ "session timeout 2" ],
+ loggrep => { qr/(buffer event|splice) timeout/ => 0 },
+ },
+ server => {
+ func => \&http_server,
+ method => "PUT",
+ },
+ len => 5,
+);
+
+1;
--- /dev/null
+# test that 2 seconds timeout does not occur while client writes for 4 seconds
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&http_client,
+ len => 5,
+ sleep => 1,
+ method => "PUT",
+ timefile => "",
+ ssl => 1,
+ loggrep => 'Issuer.*/OU=relayd/',
+ },
+ relayd => {
+ relay => [ "session timeout 2" ],
+ loggrep => { qr/buffer event timeout/ => 0 },
+ forwardssl => 1,
+ listenssl => 1,
+ },
+ server => {
+ func => \&http_server,
+ method => "PUT",
+ ssl => 1,
+ },
+ len => 5,
+);
+
+1;
--- /dev/null
+# test that 2 seconds timeout does not occur while client writes for 4 seconds
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&write_char,
+ len => 5,
+ sleep => 1,
+ timefile => "",
+ ssl => 1,
+ loggrep => 'Issuer.*/OU=relayd/',
+ },
+ relayd => {
+ relay => [ "session timeout 2" ],
+ loggrep => { qr/buffer event timeout/ => 0 },
+ forwardssl => 1,
+ listenssl => 1,
+ },
+ server => {
+ ssl => 1,
+ },
+ len => 5,
+);
+
+1;
--- /dev/null
+# test that 2 seconds timeout does not occur while client writes for 4 seconds
+
+use strict;
+use warnings;
+
+our %args = (
+ client => {
+ func => \&write_char,
+ len => 5,
+ sleep => 1,
+ timefile => "",
+ },
+ relayd => {
+ relay => [ "session timeout 2" ],
+ loggrep => { qr/(buffer event|splice) timeout/ => 0 },
+ },
+ len => 5,
+);
+
+1;