Skip to content

Commit 552a483

Browse files
Added changelog and explanatory comment to test
1 parent 3652ef2 commit 552a483

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### 1.5.0
2-
2+
- feat: #133: Fix simultaneous queries error when iteration is interrupted
33
- feat: #130: Add `distributed_migrations` database setting to support distributed migration queries.
44
- feat: #129: Add `toYearWeek` datetime functionality
55

tests/backends/clickhouse/test_driver.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ def setUpTestData(cls):
3030
)
3131

3232
def test_connection_not_reused_when_iteration_interrupted(self):
33+
"""
34+
This test demonstrates that if a queryset is iterated over and the
35+
iteration is interrupted (e.g. via a break statement), the connection
36+
used for that iteration is disconnected and not returned to the pool.
37+
"""
3338
pool = connection.connection.pool
3439

3540
connection_count_before = len(pool._pool)

0 commit comments

Comments
 (0)