kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-5893; Preserve original System.out in PrintedTest
Date Mon, 18 Sep 2017 23:30:23 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk f46d414c1 -> d0645aaee


KAFKA-5893; Preserve original System.out in PrintedTest

Author: Matthias J. Sax <matthias@confluent.io>

Reviewers: Guozhang Wang <wangguoz@gmail.com>, Bill Bejeck <bill@confluent.io>

Closes #3893 from mjsax/kafka-5893-reset-integration-test


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/d0645aae
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/d0645aae
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/d0645aae

Branch: refs/heads/trunk
Commit: d0645aaeefa77e5c4a801002d2bacdc6692dfa63
Parents: f46d414
Author: Matthias J. Sax <matthias@confluent.io>
Authored: Tue Sep 19 07:30:16 2017 +0800
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Tue Sep 19 07:30:16 2017 +0800

----------------------------------------------------------------------
 .../test/java/org/apache/kafka/streams/kstream/PrintedTest.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/d0645aae/streams/src/test/java/org/apache/kafka/streams/kstream/PrintedTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/kstream/PrintedTest.java b/streams/src/test/java/org/apache/kafka/streams/kstream/PrintedTest.java
index 849d94f..adec9ff 100644
--- a/streams/src/test/java/org/apache/kafka/streams/kstream/PrintedTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/kstream/PrintedTest.java
@@ -39,6 +39,7 @@ import static org.junit.Assert.assertThat;
 
 public class PrintedTest {
 
+    private final PrintStream originalSysOut = System.out;
     private final ByteArrayOutputStream sysOut = new ByteArrayOutputStream();
     private final Printed<String, Integer> sysOutPrinter = Printed.toSysOut();
 
@@ -49,7 +50,7 @@ public class PrintedTest {
 
     @After
     public void after() {
-        System.setOut(null);
+        System.setOut(originalSysOut);
     }
 
     @Test


Mime
View raw message