You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2015/01/16 18:22:06 UTC

[1/2] incubator-brooklyn git commit: Fix test under Windows

Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master 663f67336 -> dc53885bd


Fix test under Windows


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/6b773f99
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/6b773f99
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/6b773f99

Branch: refs/heads/master
Commit: 6b773f99f4889e58b07c145f3c74862e31ac1cfc
Parents: 663f673
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Thu Jan 15 23:34:52 2015 +0200
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Fri Jan 16 13:39:58 2015 +0200

----------------------------------------------------------------------
 .../java/brooklyn/util/stream/StreamGobblerTest.java    | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/6b773f99/utils/common/src/test/java/brooklyn/util/stream/StreamGobblerTest.java
----------------------------------------------------------------------
diff --git a/utils/common/src/test/java/brooklyn/util/stream/StreamGobblerTest.java b/utils/common/src/test/java/brooklyn/util/stream/StreamGobblerTest.java
index 4722829..e0b3885 100644
--- a/utils/common/src/test/java/brooklyn/util/stream/StreamGobblerTest.java
+++ b/utils/common/src/test/java/brooklyn/util/stream/StreamGobblerTest.java
@@ -30,8 +30,10 @@ import java.io.PipedOutputStream;
 import org.testng.annotations.Test;
 
 import brooklyn.test.Asserts;
+import brooklyn.util.os.Os;
 
 public class StreamGobblerTest {
+    private String NL = Os.LINE_SEPARATOR;
 
     @Test
     public void testGobbleStream() throws Exception {
@@ -43,7 +45,7 @@ public class StreamGobblerTest {
         try {
             gobbler.join(10*1000);
             assertFalse(gobbler.isAlive());
-            assertEquals(new String(out.toByteArray()), "abc\n");
+            assertEquals(new String(out.toByteArray()), "abc" + NL);
         } finally {
             gobbler.close();
             gobbler.interrupt();
@@ -59,20 +61,20 @@ public class StreamGobblerTest {
         gobbler.start();
         try {
             pipedOutputStream.write("line1\n".getBytes());
-            assertEqualsEventually(out, "line1\n");
+            assertEqualsEventually(out, "line1" + NL);
 
             pipedOutputStream.write("line2\n".getBytes());
-            assertEqualsEventually(out, "line1\nline2\n");
+            assertEqualsEventually(out, "line1" + NL + "line2" + NL);
 
             pipedOutputStream.write("line".getBytes());
             pipedOutputStream.write("3\n".getBytes());
-            assertEqualsEventually(out, "line1\nline2\nline3\n");
+            assertEqualsEventually(out, "line1" + NL + "line2" + NL + "line3" + NL);
 
             pipedOutputStream.close();
             
             gobbler.join(10*1000);
             assertFalse(gobbler.isAlive());
-            assertEquals(new String(out.toByteArray()), "line1\nline2\nline3\n");
+            assertEquals(new String(out.toByteArray()), "line1" + NL + "line2" + NL + "line3" + NL);
         } finally {
             gobbler.close();
             gobbler.interrupt();


[2/2] incubator-brooklyn git commit: This closes #454

Posted by al...@apache.org.
This closes #454


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

Branch: refs/heads/master
Commit: dc53885bd8706edea9e99bf14ede0ea35987876e
Parents: 663f673 6b773f9
Author: Aled Sage <al...@gmail.com>
Authored: Fri Jan 16 17:21:54 2015 +0000
Committer: Aled Sage <al...@gmail.com>
Committed: Fri Jan 16 17:21:54 2015 +0000

----------------------------------------------------------------------
 .../java/brooklyn/util/stream/StreamGobblerTest.java    | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------