[Python-modules-commits] r29558 - in packages/python-dugong/trunk/debian (3 files)
nikratio-guest at users.alioth.debian.org
nikratio-guest at users.alioth.debian.org
Sun Jun 29 22:40:35 UTC 2014
Date: Sunday, June 29, 2014 @ 22:40:34
Author: nikratio-guest
Revision: 29558
Added fix_test_abort_co_read.diff, cherry-picked from upstream to fix a
unit test failure.
Added:
packages/python-dugong/trunk/debian/patches/fix_test_abort_co_read.diff
Modified:
packages/python-dugong/trunk/debian/changelog
packages/python-dugong/trunk/debian/patches/series
Modified: packages/python-dugong/trunk/debian/changelog
===================================================================
--- packages/python-dugong/trunk/debian/changelog 2014-06-29 21:54:21 UTC (rev 29557)
+++ packages/python-dugong/trunk/debian/changelog 2014-06-29 22:40:34 UTC (rev 29558)
@@ -2,6 +2,8 @@
* New upstream release.
* Added disable_mock_server_logging.diff to make adt-run happy.
+ * Added fix_test_abort_co_read.diff, cherry-picked from upstream to fix a
+ unit test failure.
-- Nikolaus Rath <Nikolaus at rath.org> Sat, 28 Jun 2014 13:13:56 -0700
Added: packages/python-dugong/trunk/debian/patches/fix_test_abort_co_read.diff
===================================================================
--- packages/python-dugong/trunk/debian/patches/fix_test_abort_co_read.diff (rev 0)
+++ packages/python-dugong/trunk/debian/patches/fix_test_abort_co_read.diff 2014-06-29 22:40:34 UTC (rev 29558)
@@ -0,0 +1,45 @@
+Description: Fix sporadic test failure in test_abort_co_read
+Origin: https://bitbucket.org/nikratio/python-dugong/commits/01cbe62b172b581236cefaefeac51d77518c516b
+Forwarded: not-needed
+Last-Update: <2014-06-29>
+Author: Nikolaus Rath <Nikolaus at rath.org>
+
+This patch has been cherry picked from upstream.
+
+
+--- a/test/test_dugong.py
++++ b/test/test_dugong.py
+@@ -399,12 +399,27 @@
+ assert_raises(dugong.ConnectionClosed, conn.read, 200)
+
+ def test_abort_co_read(conn):
+- conn.send_request('GET', '/send_3_300-byte_chunks')
+- resp = conn.read_response()
+- assert resp.status == 200
+- cofun = conn.co_read(450)
+- next(cofun)
+- conn.disconnect()
++ # We need to delay the write to ensure that we encounter a blocking read
++ delay = 10
++ while True:
++ conn.send_request('GET', '/send_3_300-byte_chunks_delay_%d_ms' % delay)
++ resp = conn.read_response()
++ assert resp.status == 200
++ cofun = conn.co_read(450)
++ try:
++ next(cofun)
++ except StopIteration:
++ # Not good, need to wait longer
++ pass
++ else:
++ break
++ finally:
++ conn.disconnect()
++
++ if delay > 5000:
++ pytest.fail('no blocking read even with %f sec sleep' % delay)
++ delay *= 2
++
+ assert_raises(dugong.ConnectionClosed, next, cofun)
+
+ def test_abort_write(conn):
Modified: packages/python-dugong/trunk/debian/patches/series
===================================================================
--- packages/python-dugong/trunk/debian/patches/series 2014-06-29 21:54:21 UTC (rev 29557)
+++ packages/python-dugong/trunk/debian/patches/series 2014-06-29 22:40:34 UTC (rev 29558)
@@ -1,2 +1,3 @@
use-local-intersphinx.patch
disable_mock_server_logging.diff
+fix_test_abort_co_read.diff
More information about the Python-modules-commits
mailing list