Although a test is present, it doesn't check the behavior because it seems that in the test environment both streams are necessarily flushed #KT-9546 Fixed