From b0a505feed70e1ed76b0504969a3bde25e2a73a6 Mon Sep 17 00:00:00 2001 From: Aida Getoeva Date: Tue, 5 Apr 2022 08:28:59 -0700 Subject: [PATCH] mononoke/cmdlib: migrate `scrub-queue` test over to new walker scrub Summary: The diff migrates one of the tests and checks new walker scrub. Reviewed By: mitrandir77 Differential Revision: D35343497 fbshipit-source-id: 680d6720eaab13e660bee4356f68ba2126679b0c --- .../integration/test-new-walker-scrub-queue.t | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 eden/mononoke/tests/integration/test-new-walker-scrub-queue.t diff --git a/eden/mononoke/tests/integration/test-new-walker-scrub-queue.t b/eden/mononoke/tests/integration/test-new-walker-scrub-queue.t new file mode 100644 index 0000000000..625c5fcd3a --- /dev/null +++ b/eden/mononoke/tests/integration/test-new-walker-scrub-queue.t @@ -0,0 +1,32 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This software may be used and distributed according to the terms of the +# GNU General Public License found in the LICENSE file in the root +# directory of this source tree. + + $ . "${TEST_FIXTURES}/library.sh" + +setup configuration + $ MULTIPLEXED=2 default_setup_blobimport "blob_files" + hg repo + o C [draft;rev=2;26805aba1e60] + │ + o B [draft;rev=1;112478962961] + │ + o A [draft;rev=0;426bada5c675] + $ + blobimporting + +Erase the sqllites and blobstore_sync_queue + $ rm -rf "$TESTTMP/monsql/sqlite_dbs" "$TESTTMP/blobstore_sync_queue/sqlite_dbs" "$TESTTMP/blobstore" + +blobimport them into Mononoke storage again, but with write failures on one side + $ blobimport repo-hg/.hg repo --blobstore-write-chaos-rate=1 + +Check that healer queue has successful items + $ sqlite3 "$TESTTMP/blobstore_sync_queue/sqlite_dbs" "select count(*) FROM blobstore_sync_queue"; + 60 + +Check that scrub doesnt report issues despite one store being missing, as the entries needed are on the queue and less than N minutes old + $ mononoke_new_walker -l loaded --blobstore-scrub-action=ReportOnly scrub -q -I deep -b master_bookmark 2>&1 | strip_glog | sed -re 's/^(scrub: blobstore_id BlobstoreId.0. not repaired for repo0000.).*/\1/' | uniq -c | sed 's/^ *//' + 1 Seen,Loaded: 40,40