Skip to content

Commit 0102d89

Browse files
committed
fix: add cleanup test to distributed counters
1 parent f718d62 commit 0102d89

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

firestore/cloud-client/distributed_counters_test.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,15 @@ def test_distributed_counters(fs_client):
4747
counter.increment_counter(doc_ref)
4848
counter.increment_counter(doc_ref)
4949
assert counter.get_count(doc_ref) == 2
50+
51+
52+
def test_distributed_counters_cleanup(fs_client):
53+
col = fs_client.collection("dc_samples")
54+
doc_ref = col.document("distributed_counter")
55+
56+
shards = doc_ref.collection("shards").list_documents()
57+
shards_list = [shard for shard in shards]
58+
for shard in shards_list:
59+
shard.delete()
60+
61+
doc_ref.delete()

0 commit comments

Comments
 (0)