Commits

Philip Jenvey  committed 63a9f53

o CPython's GIL is keeping test_dict in 'sync' so that KeyErrors are
impossible, but in an actual multithreaded envionment like Java they can
happen. so we can't count KeyErrors as actual removes to satisfy the test's
expectations.
o giving java GC a chance to catch up at the end wasn't enough; removed that

  • Participants
  • Parent commits b570e7a

Comments (0)

Files changed (1)

File tests/test_syncdict.py

         if not running:
             break
         print "Removing item"
-        totalremoves += 1
         try: 
             del s['test']
-        except KeyError: 
+            totalremoves += 1
+        except KeyError:
             pass
-        # Give Jython more time on the final create for Java GC
-        sleeptime = (jython and x == 9) and 4 or random.random() * .89
+        sleeptime = random.random() * .89
         time.sleep(sleeptime)
 
     failed = not running