Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Fix travis build break
Browse files Browse the repository at this point in the history
Summary:
Travis provides a very low capability resource for testing and the
persistent cache tests are too aggressive. It causes the kernel to not have
enough time to do file-system meta data sync operation, causing open file
descriptors to increase and available space to decrease.

This change skips certain tests

Test Plan: Run on travis

Subscribers: leveldb, dhruba, andrewkr

Differential Revision: https://reviews.facebook.net/D61755
  • Loading branch information
krad committed Aug 9, 2016
1 parent f4d9863 commit 59ddb50
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ before_script:
- if [[ "${TRAVIS_OS_NAME}" == 'linux' ]]; then CXX=clang++-3.6; fi
- if [[ "${TRAVIS_OS_NAME}" == 'osx' ]]; then brew install gflags snappy; fi
# Limit the maximum number of open file descriptors to 2000
- ulimit -n 2000 || true
- ulimit -n 65535 || true

script:
- if [[ "${JOB_NAME}" == 'unittests' ]]; then OPT=-DTRAVIS V=1 make -j4 check_some; fi
Expand Down
8 changes: 8 additions & 0 deletions utilities/persistent_cache/persistent_cache_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ TEST_F(PersistentCacheTierTest, BlockCacheInsert) {
}
}

#ifndef TRAVIS
// the tests causes a lot of file deletions which Travis limited testing
// environment cannot handle
TEST_F(PersistentCacheTierTest, BlockCacheInsertWithEviction) {
for (auto nthreads : {1, 5}) {
for (auto max_keys : {1 * 1024 * 1024 * kStressFactor}) {
Expand All @@ -161,6 +164,7 @@ TEST_F(PersistentCacheTierTest, BlockCacheInsertWithEviction) {
}
}
}
#endif

// Tiered cache tests
TEST_F(PersistentCacheTierTest, TieredCacheInsert) {
Expand All @@ -174,6 +178,9 @@ TEST_F(PersistentCacheTierTest, TieredCacheInsert) {
}
}

#ifndef TRAVIS
// the tests causes a lot of file deletions which Travis limited testing
// environment cannot handle
TEST_F(PersistentCacheTierTest, TieredCacheInsertWithEviction) {
for (auto nthreads : {1, 5}) {
for (auto max_keys : {1 * 1024 * 1024 * kStressFactor}) {
Expand All @@ -185,6 +192,7 @@ TEST_F(PersistentCacheTierTest, TieredCacheInsertWithEviction) {
}
}
}
#endif

std::shared_ptr<PersistentCacheTier> MakeVolatileCache(
const std::string& /*dbname*/) {
Expand Down

0 comments on commit 59ddb50

Please sign in to comment.