| 89 | } |
| 90 | |
| 91 | virtual void TearDown() { |
| 92 | for (auto entry : query_reservations_) { |
| 93 | ReservationTracker* tracker = entry.second; |
| 94 | tracker->Close(); |
| 95 | } |
| 96 | for (TmpFileGroup* file_group : file_groups_) { |
| 97 | file_group->Close(); |
| 98 | } |
| 99 | global_reservations_.Close(); |
| 100 | obj_pool_.Clear(); |
| 101 | |
| 102 | // Tests modify permissions, so make sure we can delete if they didn't clean up. |
| 103 | for (const string& created_tmp_dir : created_tmp_dirs_) { |
| 104 | chmod((created_tmp_dir + SCRATCH_SUFFIX).c_str(), S_IRWXU); |
| 105 | } |
| 106 | ASSERT_OK(FileSystemUtil::RemovePaths(created_tmp_dirs_)); |
| 107 | created_tmp_dirs_.clear(); |
| 108 | CpuTestUtil::ResetAffinity(); // Some tests modify affinity. |
| 109 | } |
| 110 | |
| 111 | /// The minimum buffer size used in most tests. |
| 112 | const static int64_t TEST_BUFFER_LEN = 1024; |