Vadim Zeitlin
2015-07-05 00:07:22 UTC
On Sat, 04 Jul 2015 13:54:46 -0700 GitHub <***@github.com> wrote:
G> Commit: c767b33c3f0bc7e30ac00214e77f0fc572678e6b
G> https://github.com/swig/swig/commit/c767b33c3f0bc7e30ac00214e77f0fc572678e6b
G> Author: William S Fulton <***@fultondesigns.co.uk>
G> Date: 2015-07-03 (Fri, 03 Jul 2015)
G>
G> Changed paths:
G> M Examples/test-suite/csharp/li_boost_shared_ptr_runme.cs
G> M Examples/test-suite/csharp/li_std_auto_ptr_runme.cs
G>
G> Log Message:
G> -----------
G> C# gc tests failure fix
G>
G> Sometimes the GC just won't run the finalizers, so we output a warning
G> instead of throwing an error, so now the test-suite will pass but with a
G> warning if the number of objects is not as expected.
FWIW I had the same problem in our own unit tests for C# wrappers and
could solve it, apparently reliably, using
GC.Collect();
GC.WaitForPendingFinalizers();
Couldn't we do the same here?
G> li_std_auto_ptr was failing during Appveyor testing
G>
G> An equivalent change was put into the corresponding Java runtime tests a
G> while back.
And for Java just calling System.gc() seems to do the trick.
Regards,
VZ
G> Commit: c767b33c3f0bc7e30ac00214e77f0fc572678e6b
G> https://github.com/swig/swig/commit/c767b33c3f0bc7e30ac00214e77f0fc572678e6b
G> Author: William S Fulton <***@fultondesigns.co.uk>
G> Date: 2015-07-03 (Fri, 03 Jul 2015)
G>
G> Changed paths:
G> M Examples/test-suite/csharp/li_boost_shared_ptr_runme.cs
G> M Examples/test-suite/csharp/li_std_auto_ptr_runme.cs
G>
G> Log Message:
G> -----------
G> C# gc tests failure fix
G>
G> Sometimes the GC just won't run the finalizers, so we output a warning
G> instead of throwing an error, so now the test-suite will pass but with a
G> warning if the number of objects is not as expected.
FWIW I had the same problem in our own unit tests for C# wrappers and
could solve it, apparently reliably, using
GC.Collect();
GC.WaitForPendingFinalizers();
Couldn't we do the same here?
G> li_std_auto_ptr was failing during Appveyor testing
G>
G> An equivalent change was put into the corresponding Java runtime tests a
G> while back.
And for Java just calling System.gc() seems to do the trick.
Regards,
VZ