Fix #1549 - flush after each line of logs.

Includes some refactoring of log_printer_test to support checking for flush(), and so that each test calls the unit-under-test directly, instead of through a helper function.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Daniel Nephin 2015-11-05 15:33:42 -05:00
commit d32bb8efee
2 changed files with 42 additions and 41 deletions

View file

@ -26,6 +26,7 @@ class LogPrinter(object):
generators = list(self._make_log_generators(self.monochrome, prefix_width))
for line in Multiplexer(generators).loop():
self.output.write(line)
self.output.flush()
def _make_log_generators(self, monochrome, prefix_width):
def no_color(text):