Gradle DefaultTestLogging.setShowStandardStreams(bool) does not use the flag

(Dimitar Dimitrov) #1

I know I should submit a pull request, but that will probably take me a few weeks :-/, so here is the issue:

public TestLogging setShowStandardStreams(boolean flag) {
        events.addAll(EnumSet.of(TestLogEvent.STANDARD_OUT, TestLogEvent.STANDARD_ERROR));
        return this;

As you can see it adds the events even if the flag was false, which contradicts the documentation (and any reasonable assumption).

In addition thus is the only setter in the class that returns ‘this’ - you may want to make it consistent one way or another.

(Peter Niederwieser) #2

Thanks for the report. Raised as GRADLE-3134.