projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ff5956e
)
[treadpool] Fix flaky System.Threading.ThreadTest.SetNameInThreadPoolThread test...
author
Ludovic Henry
<ludovic@xamarin.com>
Thu, 16 Feb 2017 12:20:41 +0000
(07:20 -0500)
committer
GitHub
<noreply@github.com>
Thu, 16 Feb 2017 12:20:41 +0000
(07:20 -0500)
mcs/class/corlib/Test/System.Threading/ThreadTest.cs
patch
|
blob
|
history
diff --git
a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs
b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs
index ae5bdbfd586d3391d656861047590897068957ca..a84fa27a77d742a5faaebda98b46758d2bff70e6 100644
(file)
--- a/
mcs/class/corlib/Test/System.Threading/ThreadTest.cs
+++ b/
mcs/class/corlib/Test/System.Threading/ThreadTest.cs
@@
-912,20
+912,18
@@
namespace MonoTests.System.Threading
[Test]
public void SetNameInThreadPoolThread ()
{
[Test]
public void SetNameInThreadPoolThread ()
{
- for (int i = 0; i < 10; ++i) {
- Task t = Task.Run (delegate () {
- Thread.CurrentThread.Name = "x/" + i;
- Assert.AreEqual (Thread.CurrentThread.Name, "x/" + i, "#1");
+ Task t = Task.Run (delegate () {
+ Thread.CurrentThread.Name = "ThreadName1";
+ Assert.AreEqual (Thread.CurrentThread.Name, "ThreadName1", "#1");
-
try {
-
Thread.CurrentThread.Name = "y/" + i
;
-
Assert.Fail ("#2");
-
} catch (InvalidOperationException) {
-
}
-
});
+ try {
+
Thread.CurrentThread.Name = "ThreadName2"
;
+ Assert.Fail ("#2");
+ } catch (InvalidOperationException) {
+ }
+ });
- t.Wait ();
- }
+ t.Wait ();
}
void CheckIsRunning (string s, Thread t)
}
void CheckIsRunning (string s, Thread t)