Skip to content

Commit

Permalink
Merge pull request #5 from TinyTinyKame/feature/22352
Browse files Browse the repository at this point in the history
[FEATURE#22352] Soucis avec phing avec le TimeProfiler
  • Loading branch information
SparSio committed Nov 2, 2015
2 parents f866ba2 + b19bf89 commit aa06e40
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/TimeProfiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ public function stopTimeProfiler($event)
{
$now = round(microtime(true) * 1000);
$diff = $now - self::$last_time;
if ( $diff > self::$max_time) {
echo "{$event->getScenario()->getFile()}:{$event->getScenario()->getLine()}\n";
if (false === isset(self::$_parameters['enableCodeCoverage']) && $diff > self::$max_time) {
if (get_class($event) !== 'Behat\Behat\Event\OutlineExampleEvent') {
echo "{$event->getScenario()->getFile()}:{$event->getScenario()->getLine()}\n";
}
throw new PendingException("Request too long {$diff}ms > " . self::$max_time . "ms \n");
}
}
Expand Down

0 comments on commit aa06e40

Please sign in to comment.