Skip to content

Commit 751a88b

Browse files
committed
Post merge cleanup
1 parent 93d7ac2 commit 751a88b

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

src/sentry/rules/processing/buffer_processing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def process_buffer() -> None:
194194

195195
project_ids = list(all_project_ids_and_timestamps.keys())
196196
for project_id in project_ids:
197-
process_in_batches(project_id, processing_type)
197+
process_in_batches(buffer, project_id, processing_type)
198198

199199
buffer.delete_keys(
200200
buffer_keys,

tests/sentry/buffer/test_redis.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -322,27 +322,6 @@ def test_bulk_sorted_set_single_key(self) -> None:
322322
assert len(project_ids_and_timestamps) == 4
323323
assert set(project_ids_and_timestamps.keys()) == set(project_ids)
324324

325-
def test_buffer_hook_registry(self) -> None:
326-
"""Test that we can add an event to the registry and that the callback is invoked"""
327-
mock = Mock()
328-
redis_buffer_registry._registry[BufferHookEvent.FLUSH] = mock
329-
330-
redis_buffer_registry.callback(BufferHookEvent.FLUSH)
331-
assert mock.call_count == 1
332-
333-
@mock.patch("sentry.rules.processing.buffer_processing.metrics.timer")
334-
def test_callback(self, mock_metrics_timer: MagicMock) -> None:
335-
redis_buffer_registry.add_handler(BufferHookEvent.FLUSH, process_buffer)
336-
self.buf.process_batch()
337-
assert mock_metrics_timer.call_count == 1
338-
339-
def test_process_batch(self) -> None:
340-
"""Test that the registry's callbacks are invoked when we process a batch"""
341-
mock = Mock()
342-
redis_buffer_registry._registry[BufferHookEvent.FLUSH] = mock
343-
self.buf.process_batch()
344-
assert mock.call_count == 1
345-
346325
def test_delete_batch(self) -> None:
347326
"""Test that after we add things to redis we can clean it up"""
348327
project_id = 1

0 commit comments

Comments
 (0)