diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2016-06-19 13:41:24 +0200 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2016-06-19 13:41:24 +0200 |
commit | e85942e08edef08a13f4ec1e7f098f5362dd7a25 (patch) | |
tree | 2fd6c0fb1adcf72f3c97099e592186a604d6d984 /searchcore | |
parent | 18d43a0e3d24ccc12917a218e054317c3a853b4f (diff) |
move rmdirs to avoid failure
* on some systems (with NFS involved) you can't remove
a directory while you hold open files that lived in
the directory even though the files themselves are
unlinked. Work around this problem by calling rmdir
before a test starts and after all tests instead of
at the start of the fixture destructor.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp index 1764d6f2996..6b6abe5bc09 100644 --- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp +++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp @@ -135,6 +135,7 @@ struct Fixture _views(), _configurer() { + vespalib::rmdir(BASE_DIR, true); vespalib::mkdir(BASE_DIR); initViewSet(_views); _configurer.reset(new Configurer(_views._summaryMgr, @@ -146,7 +147,6 @@ struct Fixture 0)); } ~Fixture() { - vespalib::rmdir(BASE_DIR, true); } void initViewSet(ViewSet &views); }; @@ -293,11 +293,11 @@ struct FastAccessFixture _configurer(_view._feedView, IAttributeAdapterFactory::UP(new AttributeAdapterFactory), "test") { + vespalib::rmdir(BASE_DIR, true); vespalib::mkdir(BASE_DIR); } ~FastAccessFixture() { _writeService.sync(); - vespalib::rmdir(BASE_DIR, true); } }; @@ -608,4 +608,5 @@ TEST_F("require that we can reconfigure matchers", Fixture) TEST_MAIN() { TEST_RUN_ALL(); + vespalib::rmdir(BASE_DIR, true); } |