def METHOD_NAME(self) -> None:
    """Test replication with many global account data updates"""
    store = self.hs.get_datastores().main
    # generate lots of account data updates
    updates = []
    for i in range(_STREAM_UPDATE_TARGET_ROW_COUNT + 5):
        update = "m.test_type.%i" % (i,)
        self.get_success(store.add_account_data_for_user("test_user", update, {}))
        updates.append(update)
    # also one per-room update
    self.get_success(
        store.add_account_data_to_room("test_user", "test_room", "m.per_room", {})
    )
    # tell the notifier to catch up to avoid duplicate rows.
    # workaround for https://github.com/matrix-org/synapse/issues/7360
    # FIXME remove this when the above is fixed
    self.replicate()
    # check we're testing what we think we are: no rows should yet have been
    # received
    self.assertEqual([], self.test_handler.received_rdata_rows)
    # now reconnect to pull the updates
    self.reconnect()
    self.replicate()
    # we should have received all the expected rows in the right order
    received_rows = self.test_handler.received_rdata_rows
    for t in updates:
        (stream_name, token, row) = received_rows.pop(0)
        self.assertEqual(stream_name, AccountDataStream.NAME)
        self.assertIsInstance(row, AccountDataStream.AccountDataStreamRow)
        self.assertEqual(row.data_type, t)
        self.assertIsNone(row.room_id)
    (stream_name, token, row) = received_rows.pop(0)
    self.assertIsInstance(row, AccountDataStream.AccountDataStreamRow)
    self.assertEqual(row.data_type, "m.per_room")
    self.assertEqual(row.room_id, "test_room")
    self.assertEqual([], received_rows)