Class StandardOutputTracker

  • All Implemented Interfaces:
    Closeable, Flushable, AutoCloseable

    public class StandardOutputTracker
    extends ByteArrayOutputStream
    We use p6spy to intercept SQL commands. That can be done in 3 ways: (1) to file, (2) with a logger, (3) to standard output.

    (1) is a recipe for disaster: handling generated files, and file locks on Windows. (2) is a nightmare as well, as who knows what the SUT is configuring. (3) is likely the cleanest, easiest option. But it means we need to handle System.out

    This class can be used for any analyses of the SUT output