Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
85712a53
Kaydet (Commit)
85712a53
authored
Ara 16, 2012
tarafından
Anssi Kääriäinen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Made sure connections are actually closed in backends tests
üst
12a96bfa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
tests.py
tests/regressiontests/backends/tests.py
+5
-2
No files found.
tests/regressiontests/backends/tests.py
Dosyayı görüntüle @
85712a53
...
...
@@ -565,6 +565,9 @@ class ThreadTests(TestCase):
# connections[DEFAULT_DB_ALIAS] does.
from
django.db
import
connections
connection
=
connections
[
DEFAULT_DB_ALIAS
]
# Allow thread sharing so the connection can be closed by the
# main thread.
connection
.
allow_thread_sharing
=
True
connection
.
cursor
()
connections_set
.
add
(
connection
)
for
x
in
range
(
2
):
...
...
@@ -579,7 +582,7 @@ class ThreadTests(TestCase):
# connection opened in the main thread will automatically be closed on
# teardown).
for
conn
in
connections_set
:
if
conn
!=
connection
:
if
conn
is
not
connection
:
conn
.
close
()
def
test_connections_thread_local
(
self
):
...
...
@@ -606,7 +609,7 @@ class ThreadTests(TestCase):
# connection opened in the main thread will automatically be closed on
# teardown).
for
conn
in
connections_set
:
if
conn
!=
connection
:
if
conn
is
not
connection
:
conn
.
close
()
def
test_pass_connection_between_threads
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment