sebastianbergmann/phpunit — Issue #485: Test runner being "Killed" during post-test summary
Author: EvanK
Created: 2012-02-05 03:51:04+00:00
State: open

When running a test suite for a large project of 1000+ tests (and at *least* twice as many assertions), the tests themselves run just fine. However, any tests failing causes a huge memory usage spike during the post-test summary. This spike is so drastic that the phpunit process is killed by [Linux's OOM killer](http://lwn.net/Articles/317814/) as a result:

```
PHPUnit 3.6.7 by Sebastian Bergmann.

............................................................. 61 / 1044 ( 5%)
............................................................. 122 / 1044 ( 11%)
............................................................. 183 / 1044 ( 17%)
............................................................. 244 / 1044 ( 23%)
............................................................. 305 / 1044 ( 29%)
............................................................. 366 / 1044 ( 35%)
............................................................. 427 / 1044 ( 40%)
............................................................. 488 / 1044 ( 46%)
............................................................. 549 / 1044 ( 52%)
............................................................. 610 / 1044 ( 58%)
............................................................. 671 / 1044 ( 64%)
............................................................. 732 / 1044 ( 70%)
............................................................. 793 / 1044 ( 75%)
............................................................. 854 / 1044 ( 81%)
........................................................F.... 915 / 1044 ( 87%)
............................................................. 976 / 1044 ( 93%)
............................................................. 1037 / 1044 ( 99%)
.......

Time: 01:36, Memory: 113.25Mb

There was 1 failure:
Killed
```

Any idea what's causing this, or how to work around it?