From 8515437594c572153a1473dad87b583d39f9a95d Mon Sep 17 00:00:00 2001 From: akankshamahajan Date: Mon, 14 Nov 2022 11:39:22 -0800 Subject: [PATCH] Update unit test to avoid timeout (#10950) Summary: Update unit test to avoid timeout Pull Request resolved: https://github.com/facebook/rocksdb/pull/10950 Reviewed By: hx235 Differential Revision: D41258892 Pulled By: akankshamahajan15 fbshipit-source-id: cbfe94da63e9e54544a307845deb79ba42458301 --- file/prefetch_test.cc | 48 ------------------------------------------- 1 file changed, 48 deletions(-) diff --git a/file/prefetch_test.cc b/file/prefetch_test.cc index 55ffede50..9d96ec984 100644 --- a/file/prefetch_test.cc +++ b/file/prefetch_test.cc @@ -1590,54 +1590,6 @@ TEST_P(PrefetchTest, ReadAsyncWithPosixFS) { ASSERT_EQ(get_perf_context()->number_async_seek, 0); } - { - // Read the keys using seek. - { - ASSERT_OK(options.statistics->Reset()); - get_perf_context()->Reset(); - - auto iter = std::unique_ptr(db_->NewIterator(ro)); - int num_keys = 0; - iter->Seek(BuildKey(450)); - while (iter->Valid()) { - ASSERT_OK(iter->status()); - num_keys++; - iter->Next(); - } - ASSERT_OK(iter->status()); - - iter->Seek(BuildKey(450)); - while (iter->Valid()) { - ASSERT_OK(iter->status()); - num_keys++; - iter->Prev(); - } - - ASSERT_EQ(num_keys, total_keys + 1); - ASSERT_GT(buff_prefetch_count, 0); - - // Check stats to make sure async prefetch is done. - { - HistogramData async_read_bytes; - options.statistics->histogramData(ASYNC_READ_BYTES, &async_read_bytes); - HistogramData prefetched_bytes_discarded; - options.statistics->histogramData(PREFETCHED_BYTES_DISCARDED, - &prefetched_bytes_discarded); - - // Not all platforms support iouring. In that case, ReadAsync in posix - // won't submit async requests. - if (read_async_called) { - ASSERT_GT(async_read_bytes.count, 0); - ASSERT_GT(get_perf_context()->number_async_seek, 0); - } else { - ASSERT_EQ(async_read_bytes.count, 0); - ASSERT_EQ(get_perf_context()->number_async_seek, 0); - } - ASSERT_GT(prefetched_bytes_discarded.count, 0); - } - } - } - SyncPoint::GetInstance()->DisableProcessing(); SyncPoint::GetInstance()->ClearAllCallBacks();