projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #5428 from kumpera/wasm-support-p2
[mono.git]
/
mono
/
tests
/
sgen-domain-unload-2.cs
diff --git
a/mono/tests/sgen-domain-unload-2.cs
b/mono/tests/sgen-domain-unload-2.cs
index 6570842703c7c6377e169578cd24b6062762a33f..d63cd62d9eb4ab3a77cff750a629dc3d0bb25dda 100644
(file)
--- a/
mono/tests/sgen-domain-unload-2.cs
+++ b/
mono/tests/sgen-domain-unload-2.cs
@@
-9,7
+9,6
@@
This is a regression test for a crash in the domain object cleaner code that did
stop-the-world before walking the heap.
*/
class Driver {
stop-the-world before walking the heap.
*/
class Driver {
-
static void AllocStuff ()
{
var x = new object ();
static void AllocStuff ()
{
var x = new object ();
@@
-30,14
+29,17
@@
class Driver {
t.IsBackground = true;
t.Start ();
}
t.IsBackground = true;
t.Start ();
}
-
- for (int i = 0; i < 100; ++i) {
- var ad = AppDomain.CreateDomain ("domain_" + i);
+
+ int iterations = 0;
+
+ for (TestTimeout timeout = TestTimeout.Start(TimeSpan.FromSeconds(TestTimeout.IsStressTest ? 120 : 5)); timeout.HaveTimeLeft;) {
+ var ad = AppDomain.CreateDomain ("domain_" + iterations);
ad.DoCallBack (new CrossAppDomainDelegate (AllocStuff));
AppDomain.Unload (ad);
ad.DoCallBack (new CrossAppDomainDelegate (AllocStuff));
AppDomain.Unload (ad);
+
Console.Write (".");
Console.Write (".");
- if (
i > 0 && i
% 20 == 0) Console.WriteLine ();
+ if (
(++iterations)
% 20 == 0) Console.WriteLine ();
}
}
- Console.WriteLine (
"\ndone
");
+ Console.WriteLine (
$"\ndone {iterations} iterations
");
}
}
-}
\ No newline at end of file
+}