[Jython-checkins] jython: Add some more gc.collect() to test_weakset, does not seem to be failing in
Stefan Richthofer
Stefan.Richthofer at gmx.de
Fri Jan 22 03:04:34 EST 2016
Did you alternatively try to put some wait-time behind the collect call? It usually runs asynchronously and I suspect calling it twice only adds the sufficient wait time implicitly.
> Gesendet: Freitag, 22. Januar 2016 um 05:28 Uhr
> Von: "darjus.loktevic" <jython-checkins at python.org>
> An: jython-checkins at python.org
> Betreff: [Jython-checkins] jython: Add some more gc.collect() to test_weakset, does not seem to be failing in
>
> https://hg.python.org/jython/rev/f58d86b21716
> changeset: 7883:f58d86b21716
> user: Darjus Loktevic <darjus at gmail.com>
> date: Fri Jan 22 15:28:14 2016 +1100
> summary:
> Add some more gc.collect() to test_weakset, does not seem to be failing in circleci anymore under the matrix of JVMs
>
> files:
> Lib/test/test_weakset.py | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
>
> diff --git a/Lib/test/test_weakset.py b/Lib/test/test_weakset.py
> --- a/Lib/test/test_weakset.py
> +++ b/Lib/test/test_weakset.py
> @@ -415,7 +415,7 @@
> finally:
> it = None # should commit all removals
>
> - gc.collect() # final before asserts
> + gc.collect(); gc.collect() # final before asserts
> with testcontext() as u:
> self.assertNotIn(u, s)
> with testcontext() as u:
> @@ -447,6 +447,7 @@
> n1 = len(s)
> del it
> gc.collect()
> + gc.collect()
> n2 = len(s)
> # one item may be kept alive inside the iterator
> self.assertIn(n1, (0, 1))
>
> --
> Repository URL: https://hg.python.org/jython
> _______________________________________________
> Jython-checkins mailing list
> Jython-checkins at python.org
> https://mail.python.org/mailman/listinfo/jython-checkins
>
More information about the Jython-checkins
mailing list