Skip to content

Commit

Permalink
niner++ for fixing green threads and invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart Wiegmans committed Jul 16, 2012
1 parent 92bda93 commit b49449c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pudding/psgi.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use Server;
use Client;
use config;
use Test::More;
use Test::More tests => 8;
use Time::HiRes qw(time);
use strict;

Expand Down Expand Up @@ -38,7 +38,7 @@
function delayed(var responder) {
var writer = responder(203, {'x-hello':'world'});
sleep(1);
say(typeof(writer));
writer.write('some message');
}
function main[main](var env) {
Expand All @@ -49,7 +49,7 @@
$server->serve("hello.wxd", $helloworld, 0755);
$server->serve("delay.wxd", $delayed, 0755);
$server->serve('streaming.wxd', $streaming, 0755);
$server->debug();
$server->start();
Client::setup($server);
is(content("hello.wxd"), "this is a sample psgi app");
is(status("hello.wxd"), 203);
Expand All @@ -63,5 +63,3 @@
my $then = time;
ok($then - $now > 0.5);

print $server->errors;
done_testing;

0 comments on commit b49449c

Please sign in to comment.