]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/crimson: add event-type-checking next_round2() to BackfillFixture
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 10 Jan 2023 14:38:31 +0000 (14:38 +0000)
committerXuehan Xu <xuxuehan@qianxin.com>
Sat, 31 Aug 2024 13:24:12 +0000 (21:24 +0800)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/test/crimson/test_backfill.cc

index 1ce9b42ad381fcd6512d20e989673f770d5e4798..bf958cd5ae726dcbad0be1d1e655f1254d8bff93 100644 (file)
@@ -154,6 +154,14 @@ public:
     }
   }
 
+  template <class EventT>
+  void next_round2() {
+    ceph_assert(events_to_dispatch.size());
+    ceph_assert(typeid(*events_to_dispatch.front()) == typeid(EventT));
+    backfill_state.process_event(std::move(events_to_dispatch.front()));
+    events_to_dispatch.pop_front();
+  }
+
   void next_till_done() {
     while (!events_to_dispatch.empty()) {
       next_round();