You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by ff...@apache.org on 2016/08/30 03:46:20 UTC
karaf git commit: [KARAF-4681]System.setOut(null) in GrepTest cause
other tests failure which need use System.out
Repository: karaf
Updated Branches:
refs/heads/master bbe4b14df -> 82fd5bf32
[KARAF-4681]System.setOut(null) in GrepTest cause other tests failure which need use System.out
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/82fd5bf3
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/82fd5bf3
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/82fd5bf3
Branch: refs/heads/master
Commit: 82fd5bf32b3c97a029ab9ad493d6ae5426491fb9
Parents: bbe4b14
Author: Freeman Fang <fr...@gmail.com>
Authored: Tue Aug 30 11:46:07 2016 +0800
Committer: Freeman Fang <fr...@gmail.com>
Committed: Tue Aug 30 11:46:07 2016 +0800
----------------------------------------------------------------------
.../test/java/org/apache/karaf/shell/commands/impl/GrepTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/82fd5bf3/shell/commands/src/test/java/org/apache/karaf/shell/commands/impl/GrepTest.java
----------------------------------------------------------------------
diff --git a/shell/commands/src/test/java/org/apache/karaf/shell/commands/impl/GrepTest.java b/shell/commands/src/test/java/org/apache/karaf/shell/commands/impl/GrepTest.java
index 877b2b8..10dbe51 100644
--- a/shell/commands/src/test/java/org/apache/karaf/shell/commands/impl/GrepTest.java
+++ b/shell/commands/src/test/java/org/apache/karaf/shell/commands/impl/GrepTest.java
@@ -46,6 +46,7 @@ public class GrepTest extends TestCase {
public void testHonorColorNever() throws Exception {
InputStream input = System.in;
+ PrintStream output = System.out;
try {
ByteArrayInputStream bais = new ByteArrayInputStream("abc".getBytes());
System.setIn(bais);
@@ -59,7 +60,7 @@ public class GrepTest extends TestCase {
assertEquals("abc", outContent.toString().trim());
} finally {
System.setIn(input);
- System.setOut(null);
+ System.setOut(output);
}
}
}