From aacd2fa82d68de26ae27c2056a6ac17cc3421b04 Mon Sep 17 00:00:00 2001 From: Lauro Moura Date: Tue, 26 Nov 2019 11:56:51 -0300 Subject: [PATCH] csharp: Iterate more in GC-dependent test Summary: The inheritance test depends on the objects being actively destroyed. Currently this happens in a two step process, where first the C# object is collected from the GC. As this happens in a separate thread, we schedule a callback to run in the main loop to actually unref the EO object. This commit adds more iterations to make sure the EO of the parent is unref'd and releases the child. This should be the last C#-related CI test failure Ref T8313 Reviewers: stefan_schmidt, brunobelo, felipealmeida Reviewed By: felipealmeida Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8313 Differential Revision: https://phab.enlightenment.org/D10612 --- src/tests/efl_mono/Inheritance.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tests/efl_mono/Inheritance.cs b/src/tests/efl_mono/Inheritance.cs index 1595759994..852a639029 100644 --- a/src/tests/efl_mono/Inheritance.cs +++ b/src/tests/efl_mono/Inheritance.cs @@ -142,9 +142,9 @@ class TestInheritance CreateAndCheckInheritedObjects(out parentWRef, out childWRef); - // Two invocations to iterate a the child wasn't being released with a single one - Test.CollectAndIterate(); - Test.CollectAndIterate(); + // We need some extra iterations of the main loop to allow the async callbacks + // registered from the Dispose method to the main loop to run. + Test.CollectAndIterate(10, 10); var parent = (Dummy.TestObject) parentWRef.Target; var child = (Dummy.TestObject) childWRef.Target;