From 9e7a497fd958da21b25fd48640de8a34b1048b51 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 24 Nov 2008 11:13:58 +0000 Subject: [PATCH] 2008-11-24 Tatsuhiro Tsujikawa Closed files after the test cases in MultiDiskWriterTest:: testResetDiskWriterEntries(). This will fix the unit test error in mingw32 build. * test/MultiDiskWriterTest.cc --- ChangeLog | 7 +++++++ test/MultiDiskAdaptorTest.cc | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index af6b6a51..1b958d88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-24 Tatsuhiro Tsujikawa + + Closed files after the test cases in MultiDiskWriterTest:: + testResetDiskWriterEntries(). This will fix the unit test error + in mingw32 build. + * test/MultiDiskWriterTest.cc + 2008-11-23 Tatsuhiro Tsujikawa Use HEAD method to get file size from HTTP server for segmented diff --git a/test/MultiDiskAdaptorTest.cc b/test/MultiDiskAdaptorTest.cc index 508b164e..e07c4c14 100644 --- a/test/MultiDiskAdaptorTest.cc +++ b/test/MultiDiskAdaptorTest.cc @@ -80,6 +80,8 @@ void MultiDiskAdaptorTest::testResetDiskWriterEntries() CPPUNIT_ASSERT(!entries[3]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[4]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[5]->getDiskWriter().isNull()); + + adaptor->closeFile(); } { std::deque > fileEntries = createEntries(); @@ -97,6 +99,8 @@ void MultiDiskAdaptorTest::testResetDiskWriterEntries() CPPUNIT_ASSERT(!entries[3]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[4]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[5]->getDiskWriter().isNull()); + + adaptor->closeFile(); } { std::deque > fileEntries = createEntries(); @@ -115,6 +119,8 @@ void MultiDiskAdaptorTest::testResetDiskWriterEntries() CPPUNIT_ASSERT(!entries[3]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[4]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[5]->getDiskWriter().isNull()); + + adaptor->closeFile(); } { std::deque > fileEntries = createEntries(); @@ -132,6 +138,8 @@ void MultiDiskAdaptorTest::testResetDiskWriterEntries() CPPUNIT_ASSERT(!entries[3]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[4]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[5]->getDiskWriter().isNull()); + + adaptor->closeFile(); } { std::deque > fileEntries = createEntries(); @@ -149,6 +157,8 @@ void MultiDiskAdaptorTest::testResetDiskWriterEntries() // Because entries[3] spans entries[4] CPPUNIT_ASSERT(!entries[4]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[5]->getDiskWriter().isNull()); + + adaptor->closeFile(); } { std::deque > fileEntries = createEntries(); @@ -166,6 +176,8 @@ void MultiDiskAdaptorTest::testResetDiskWriterEntries() CPPUNIT_ASSERT(entries[3]->getDiskWriter().isNull()); CPPUNIT_ASSERT(entries[4]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[5]->getDiskWriter().isNull()); + + adaptor->closeFile(); } { std::deque > fileEntries = createEntries(); @@ -182,6 +194,8 @@ void MultiDiskAdaptorTest::testResetDiskWriterEntries() CPPUNIT_ASSERT(!entries[3]->getDiskWriter().isNull()); CPPUNIT_ASSERT(!entries[4]->getDiskWriter().isNull()); CPPUNIT_ASSERT(entries[5]->getDiskWriter().isNull()); + + adaptor->closeFile(); } }