[Bps-public-commit] r16775 - Prophet/trunk/t

jesse at bestpractical.com jesse at bestpractical.com
Sat Nov 8 23:52:59 EST 2008


Author: jesse
Date: Sat Nov  8 23:52:59 2008
New Revision: 16775

Modified:
   Prophet/trunk/t/resty-server.t

Log:
* make resty_server run on a random test port.

Modified: Prophet/trunk/t/resty-server.t
==============================================================================
--- Prophet/trunk/t/resty-server.t	(original)
+++ Prophet/trunk/t/resty-server.t	Sat Nov  8 23:52:59 2008
@@ -27,7 +27,7 @@
 sub url {
     return join( "/", $url_root, @_ );
 }
-
+diag(url());
 $ua->get_ok( url('records.json') );
 is( $ua->content, '[]' );
 
@@ -99,4 +99,6 @@
 package Prophet::TestServer;
 use base qw/Test::HTTP::Server::Simple Prophet::Server/;
 
+
+sub port { my $self = shift; $self->{_port} ||= int(rand(1024))+10000; return $self->{_port} }
 1;



More information about the Bps-public-commit mailing list