Mercurial > hg > nginx-tests
comparison h2.t @ 1174:ec9ddfed9b63
Tests: handled SIGPIPE in h2.t.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 04 May 2017 19:19:30 +0300 |
parents | ff1a37f37419 |
children | 83c88a830a45 |
comparison
equal
deleted
inserted
replaced
1173:1a54d45d5587 | 1174:ec9ddfed9b63 |
---|---|
292 | 292 |
293 # client-initiated PUSH_PROMISE, just to ensure nothing went wrong | 293 # client-initiated PUSH_PROMISE, just to ensure nothing went wrong |
294 # N.B. other implementation returns zero code, which is not anyhow regulated | 294 # N.B. other implementation returns zero code, which is not anyhow regulated |
295 | 295 |
296 $s = Test::Nginx::HTTP2->new(); | 296 $s = Test::Nginx::HTTP2->new(); |
297 syswrite($s->{socket}, pack("x2C2xN", 4, 0x5, 1)); | 297 { |
298 local $SIG{PIPE} = 'IGNORE'; | |
299 syswrite($s->{socket}, pack("x2C2xN", 4, 0x5, 1)); | |
300 } | |
298 $frames = $s->read(all => [{ type => "GOAWAY" }]); | 301 $frames = $s->read(all => [{ type => "GOAWAY" }]); |
299 | 302 |
300 ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; | 303 ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames; |
301 ok($frame, 'client-initiated PUSH_PROMISE - GOAWAY frame'); | 304 ok($frame, 'client-initiated PUSH_PROMISE - GOAWAY frame'); |
302 is($frame->{code}, 1, 'client-initiated PUSH_PROMISE - GOAWAY PROTOCOL_ERROR'); | 305 is($frame->{code}, 1, 'client-initiated PUSH_PROMISE - GOAWAY PROTOCOL_ERROR'); |