Quotet/mojolicious/longpolling_lite_app.t ....... 39/128
# Failed test 'right error'
# at t/mojolicious/longpolling_lite_app.t line 332.
# got: undef
# expected: 'Interrupted!'
# Failed test 'right content'
# at t/mojolicious/longpolling_lite_app.t line 333.
# got: 'hi there, whats up?'
# expected: 'hi '
t/mojolicious/longpolling_lite_app.t ....... 123/128
# Failed test 'right content'
# at t/mojolicious/longpolling_lite_app.t line 431.
# got: ''
# expected: 'how'
# Failed test 'right content'
# at t/mojolicious/longpolling_lite_app.t line 446.
# got: ''
# expected: 'how'
# Looks like you failed 4 tests of 128.
t/mojolicious/longpolling_lite_app.t ....... Dubious, test returned 4 (wstat 1024, 0x400)
Failed 4/128 subtests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use Mojo::Base -strict;
use Test::More tests => 6;
use Mojo::IOLoop;
use Mojolicious::Lite;
use Test::Mojo;
# GET /too_long
my $too_long;
get '/too_long' => sub {
my $self = shift;
$self->on(finish => sub { $too_long = 'finished!' });
$self->res->code(200);
$self->res->headers->content_type('text/plain');
$self->res->headers->content_length(1001);
$self->write('x' x 1000);
Mojo::IOLoop->timer(
5 => sub {
$self->write(
sub {
my $self = shift;
$self->write('x');
}
);
}
);
};
my $t = Test::Mojo->new;
# GET /too_long (request timeout)
my $tx = $t->ua->request_timeout(0.5)->build_tx(GET => '/too_long');
my $buffer = '';
$tx->res->body(
sub {
my ($self, $chunk) = @_;
$buffer .= $chunk;
}
);
$t->ua->start($tx);
is $tx->res->code, 200, 'right status';
is $tx->error, 'Request timeout.', 'right error';
is $buffer, 'x' x 1000, 'right content';
$t->ua->request_timeout(0);
# GET /too_long (request timeout)
$tx = $t->ua->request_timeout(3)->build_tx(GET => '/too_long');
$buffer = '';
$tx->res->body(
sub {
my ($self, $chunk) = @_;
$buffer .= $chunk;
}
);
$t->ua->start($tx);
is $tx->res->code, 200, 'right status';
is $tx->error, 'Request timeout.', 'right error';
is $buffer, 'x' x 1000, 'right content';
$t->ua->request_timeout(0);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
PERL-5.14 C:\strawberry\cpan\build\Mojolicious-2.98-8GZfD6>perl -Iblib -Ilib t\xxx.t
1..6
ok 1 - right status
ok 2 - right error
not ok 3 - right content
# Failed test 'right content'
# at t\xxx.t line 44.
# got: ''
# expected: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
# Looks like you failed 2 tests of 6.
1
2
3
4
5
6
7
X:\opt\perl-5.14\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/*/*
.t
t/mojo/app.t ............................... 1/55 Can't create listen socket: Der Zugriff auf einen Socket war aufgrund
der Zugriffsrechte des Sockets unzulõssig. at X:\opt\perl-5.14\cpan\build\Mojolicious-2.98-ladNLi\blib\lib/Mojo/IOLoop.p
m line 153
# Looks like you planned 55 tests but ran 14.
# Looks like your test exited with 10013 just after 14.