lunarmodules / busted

Elegant Lua unit testing.
https://lunarmodules.github.io/busted/
MIT License
1.43k stars 186 forks source link

TAP handler: flush output immediately #554

Closed justinmk closed 7 years ago

justinmk commented 7 years ago

8a4d223c5ae4ace8d88d4ee3ca79020f6e67ae21 changed the TAP handler to write results after each test, but the output is still buffered.

If a test hangs, the buffered results of many previous tests will never be printed, and it's not clear which test caused the hang. Flushing the output avoids this.

cc @o-lim

o-lim commented 7 years ago

👍

justinmk commented 7 years ago

FWIW we have been using this approach without issue in the neovim test suite. Flushing to the output device won't be the bottleneck unless one has hundreds of thousands of extremely fast test cases. The primary purpose of TAP is visibility, debugging hangs is an important factor there.

@ajacksified @DorianGray

DorianGray commented 7 years ago

Thanks! Looks good.