You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2018/06/05 20:15:36 UTC
mesos git commit: Fixed failing ArchiverTest due to long filename.
Repository: mesos
Updated Branches:
refs/heads/master 6ac18b3ff -> fd362da76
Fixed failing ArchiverTest due to long filename.
Replaced most of the ArchiverTest.ExtractZipFileWithLongDestinationDir
test such that it constructs a long path similar to how it is done in
filesystem_tests.cpp. This resolves a failure in the Jenkins BuildBot
job that runs all of the tests inside a Docker container, which uses a
filesystem called AUFS, which has an individual file name limit of 242
characters.
Review: https://reviews.apache.org/r/67454/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/fd362da7
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/fd362da7
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/fd362da7
Branch: refs/heads/master
Commit: fd362da76b0c5b7c97910d30271f93eac49c9eaa
Parents: 6ac18b3
Author: John Kordich <jo...@microsoft.com>
Authored: Tue Jun 5 12:23:55 2018 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Tue Jun 5 12:23:55 2018 -0700
----------------------------------------------------------------------
3rdparty/stout/tests/archiver_tests.cpp | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/fd362da7/3rdparty/stout/tests/archiver_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/archiver_tests.cpp b/3rdparty/stout/tests/archiver_tests.cpp
index fc8db56..eddda08 100644
--- a/3rdparty/stout/tests/archiver_tests.cpp
+++ b/3rdparty/stout/tests/archiver_tests.cpp
@@ -20,6 +20,7 @@
#include <stout/base64.hpp>
#include <stout/gtest.hpp>
#include <stout/os.hpp>
+#include <stout/uuid.hpp>
#include <stout/os/write.hpp>
@@ -479,14 +480,17 @@ TEST_F(ArchiverTest, ExtractZipFileWithLongDestinationDir)
"AAAAXAAAAAAA").get()));
// Make a destination directory to extract the archive to.
- const size_t max_path_length = 248;
- string destDir = path::join(dir, string(max_path_length + 1, 'b'));
+ const size_t max_path_length = 260;
+ while (dir.length() <= max_path_length) {
+ dir = path::join(dir, id::UUID::random().toString());
+ }
- ASSERT_SOME(os::mkdir(destDir));
+ EXPECT_TRUE(dir.length() > max_path_length);
+ ASSERT_SOME(os::mkdir(dir));
- EXPECT_SOME(archiver::extract(sourcePath.get(), destDir));
+ EXPECT_SOME(archiver::extract(sourcePath.get(), dir));
- string extractedFile = path::join(destDir, "hello");
+ string extractedFile = path::join(dir, "hello");
ASSERT_TRUE(os::exists(extractedFile));
ASSERT_SOME_EQ("Howdy there, partner! (.zip)\n", os::read(extractedFile));