You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by an...@apache.org on 2018/06/28 18:22:30 UTC
[16/16] mesos git commit: Windows: Made `PipeLargeOutput` test work
with IOCP backend.
Windows: Made `PipeLargeOutput` test work with IOCP backend.
The `PipeLargeOutput` test was calling `io::read`, which was returning
the wrong error since it operates at a higher level abstraction. The
test really just checks if a pipe EOF returns `ERROR_BROKEN_PIPE`, so
the test was changed to use the lower level `os::read`.
Review: https://reviews.apache.org/r/67392/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a9066455
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a9066455
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a9066455
Branch: refs/heads/master
Commit: a906645522807ecc0322707026e22d78bb82e7ac
Parents: e2cba0e
Author: Akash Gupta <ak...@hotmail.com>
Authored: Wed Jun 27 14:30:17 2018 -0700
Committer: Andrew Schwartzmeyer <an...@schwartzmeyer.com>
Committed: Wed Jun 27 15:06:10 2018 -0700
----------------------------------------------------------------------
3rdparty/libprocess/src/tests/subprocess_tests.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/a9066455/3rdparty/libprocess/src/tests/subprocess_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/subprocess_tests.cpp b/3rdparty/libprocess/src/tests/subprocess_tests.cpp
index b12490e..aa939a6 100644
--- a/3rdparty/libprocess/src/tests/subprocess_tests.cpp
+++ b/3rdparty/libprocess/src/tests/subprocess_tests.cpp
@@ -380,7 +380,9 @@ TEST_F(SubprocessTest, PipeLargeOutput)
::SetLastError(0);
#endif // __WINDOWS__
- AWAIT_EXPECT_EQ(output, io::read(s->out().get()));
+ // Read 1 more than the input size, so we can trigger the EOF error
+ // on Windows.
+ EXPECT_SOME_EQ(output, os::read(s->out().get(), 1 + output.size()));
#ifdef __WINDOWS__
// NOTE: On Windows, this is the end-of-file condition when reading