Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Revert "debug"
Browse files Browse the repository at this point in the history
This reverts commit 75c2e48.
  • Loading branch information
clokep committed Aug 2, 2022
1 parent a4dfc4c commit a6d67c2
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions tests/storage/test_event_push_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def test_count_aggregation(self) -> None:
self.helper.join(room_id, other_id, tok=other_token)

last_event_id: str
desc = ["A"]

def _assert_counts(
noitf_count: int, unread_count: int, highlight_count: int
Expand Down Expand Up @@ -99,22 +98,13 @@ def _create_event(highlight: bool = False) -> str:
content={"msgtype": "m.text", "body": user_id if highlight else "msg"},
tok=other_token,
)

self.get_success(
self.store.db_pool.runInteraction("foo", f, "_inject_actions")
)

nonlocal last_event_id
last_event_id = result["event_id"]
return last_event_id

def _rotate() -> None:
self.get_success(self.store._rotate_notifs())

self.get_success(
self.store.db_pool.runInteraction("foo", f, "_rotate (notifs)")
)

def _mark_read(event_id: str) -> None:
self.get_success(
self.store.insert_receipt(
Expand All @@ -126,28 +116,6 @@ def _mark_read(event_id: str) -> None:
)
)

self.get_success(self.store.db_pool.runInteraction("foo", f, "_mark_read"))

def f(txn, func):
print(f"\n{desc[0]}: {func}")
txn.execute("SELECT * FROM event_push_summary")
print(f"event_push_summary: {[x[:6] for x in txn.fetchall()]}")

txn.execute("SELECT * FROM event_push_actions")
print(f"event_push_actions: {[x[:10] for x in txn.fetchall()]}")

txn.execute("SELECT * FROM event_push_actions_staging")
print(f"event_push_actions_staging: {[x[:6] for x in txn.fetchall()]}")

txn.execute("SELECT * FROM event_push_summary_last_receipt_stream_id")
print(f"event_push_summary_last_receipt_stream_id: {txn.fetchall()}")

txn.execute("SELECT * FROM event_push_summary_stream_ordering")
print(f"event_push_summary_stream_ordering: {txn.fetchall()}")

desc[0] = chr(ord(desc[0]) + 1)
print()

_assert_counts(0, 0, 0)
_create_event()
_assert_counts(1, 1, 0)
Expand Down

0 comments on commit a6d67c2

Please sign in to comment.