[phc-internals] [phc commit] r1436 - trunk/test/framework/lib

codesite-noreply at google.com codesite-noreply at google.com
Fri Jul 4 16:10:53 IST 2008


Author: paul.biggar
Date: Fri Jul  4 08:09:42 2008
New Revision: 1436

Modified:
   trunk/test/framework/lib/async_test.php
   trunk/test/framework/lib/header.php
   trunk/test/framework/lib/test.php

Log:
Allow tests to override how long it takes for a test case to timeout.


Modified: trunk/test/framework/lib/async_test.php
==============================================================================
--- trunk/test/framework/lib/async_test.php	(original)
+++ trunk/test/framework/lib/async_test.php	Fri Jul  4 08:09:42 2008
@@ -258,7 +258,7 @@
 				unset ($this->running_procs [$index]); // remove from the running list
 				$bundle->continuation (); // start the next bit straight away
 			}
-			else if (time () > $bundle->start_time + 20)
+			else if (time () > $bundle->start_time + $this->max_time)
 			{
 				$bundle->read_streams ();


Modified: trunk/test/framework/lib/header.php
==============================================================================
--- trunk/test/framework/lib/header.php	(original)
+++ trunk/test/framework/lib/header.php	Fri Jul  4 08:09:42 2008
@@ -475,7 +475,6 @@
 			file_put_contents ("php://stderr", $new_err);
 		}

-		// 20 second timeout on any command
 		if (time () > $start_time + $timeout)
 		{
 			$out = stream_get_contents ($pipes[1]);

Modified: trunk/test/framework/lib/test.php
==============================================================================
--- trunk/test/framework/lib/test.php	(original)
+++ trunk/test/framework/lib/test.php	Fri Jul  4 08:09:42 2008
@@ -15,6 +15,7 @@
 		$this->failures = 0;
 		$this->skipped = 0;
 		$this->timeouts = 0;
+		$this->max_time = 20;
 		$this->total = 0;
 		$this->solo_tests = 0;
 		$this->timers = array();


More information about the phc-internals mailing list