[Jython-checkins] jython: Fixed #2568 (by applying PR 64 https://github.com/jythontools/jython/pull/64)

stefan.richthofer jython-checkins at python.org
Wed Mar 15 09:26:41 EDT 2017


https://hg.python.org/jython/rev/f06cf81336e0
changeset:   8057:f06cf81336e0
user:        James Mudd <james.mudd at gmail.com>
date:        Wed Mar 15 14:26:13 2017 +0100
summary:
  Fixed #2568 (by applying PR 64 https://github.com/jythontools/jython/pull/64)

files:
  Lib/test/lock_tests.py |  8 +++++++-
  NEWS                   |  1 +
  2 files changed, 8 insertions(+), 1 deletions(-)


diff --git a/Lib/test/lock_tests.py b/Lib/test/lock_tests.py
--- a/Lib/test/lock_tests.py
+++ b/Lib/test/lock_tests.py
@@ -409,8 +409,14 @@
             results.append(t2 - t1)
         Bunch(f, N).wait_for_finished()
         self.assertEqual(len(results), 5)
+        # Fudge factor for running on the JVM - actual waits on
+        # some OS platforms might be like this example,
+        # 0.199999809265, slightly less than 0.2 seconds. To avoid
+        # unnecessary flakiness in testing, make epsilon
+        # relatively large:
+        epsilon = 0.01
         for dt in results:
-            self.assertTrue(dt >= 0.2, dt)
+            self.assertTrue(dt >= 0.2 - epsilon, dt)
 
 
 class BaseSemaphoreTests(BaseTestCase):
diff --git a/NEWS b/NEWS
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@
 
 Jython 2.7.1rc1
   Bugs fixed
+    - [ 2568 ] test_threading intermittent failure
     - [ 2559 ] test_marshal fails
     - [ 2564 ] test_socket_jy fails on Linux
     - [ 2524 ] datetime <-> time conversion incorrect in non UTC times

-- 
Repository URL: https://hg.python.org/jython


More information about the Jython-checkins mailing list