Skip to content

Commit

Permalink
more consistent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 10, 2015
1 parent 6cd7658 commit b003260
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions t/mojo/hypnotoad.t
Expand Up @@ -94,9 +94,8 @@ sleep 3;
sleep 1 while !_port($port2);
my $old = _pid();

my $ua = Mojo::UserAgent->new;

# Application is alive
my $ua = Mojo::UserAgent->new;
my $tx = $ua->get("http://127.0.0.1:$port1/hello");
ok $tx->is_finished, 'transaction is finished';
ok $tx->keep_alive, 'connection will be kept alive';
Expand Down
3 changes: 1 addition & 2 deletions t/mojo/morbo.t
Expand Up @@ -40,9 +40,8 @@ my $pid = open my $server, '-|', $^X, "$prefix/morbo", '-l',
"http://127.0.0.1:$port", $script;
sleep 1 while !_port($port);

my $ua = Mojo::UserAgent->new;

# Application is alive
my $ua = Mojo::UserAgent->new;
my $tx = $ua->get("http://127.0.0.1:$port/hello");
ok $tx->is_finished, 'transaction is finished';
is $tx->res->code, 200, 'right status';
Expand Down

0 comments on commit b003260

Please sign in to comment.