summaryrefslogtreecommitdiff
path: root/test/backupstore
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-04-06 19:41:26 +0000
committerChris Wilson <chris+github@qwirx.com>2015-04-06 19:41:26 +0000
commit5a1512912e369b8df78769a4a9ebd89c92e4556b (patch)
treee067a32e719309e126a7a4c56f6157a08a6e3138 /test/backupstore
parent3cf9311eba9e6b8374b877eea385031936d187ba (diff)
Fix test failures caused by failure to commit the temporary refcount DB.
Files need to be closed before renaming over them on Windows.
Diffstat (limited to 'test/backupstore')
-rw-r--r--test/backupstore/testbackupstore.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/backupstore/testbackupstore.cpp b/test/backupstore/testbackupstore.cpp
index 2e8f9f37..a39fd1ff 100644
--- a/test/backupstore/testbackupstore.cpp
+++ b/test/backupstore/testbackupstore.cpp
@@ -817,6 +817,11 @@ bool test_temporary_refcount_db_is_independent()
BackupStoreException, UnknownObjectRefCountRequested);
temp->Discard();
+ // Need to delete perm object so it doesn't keep a filehandle open,
+ // preventing tearDown from rewriting the refcount DB and thus causing
+ // test failure.
+ perm.reset();
+
return teardown_test_backupstore();
}