Merge branch 'upstream'
Former-commit-id: 189ebc3947f517ae2c8528a80335612826539903
This commit is contained in:
commit
9fad6cd92c
@ -1 +1 @@
|
||||
ceb952e3a229b6b04abaa5b97538f01813e580ae
|
||||
e4b811826621e311f69263092df0e00b179fa373
|
@ -1 +1 @@
|
||||
fdfbffe66849adf184e5d9e85c7fde89cdaf8fb2
|
||||
f3be6684494b4fb113573ae47af14b3825890374
|
@ -60,6 +60,23 @@ namespace NUnit.Framework.Internal
|
||||
|
||||
Dictionary<Guid, TestResult> lookupTable;
|
||||
|
||||
// Why is CallContext used? Consider the following scenario:
|
||||
//
|
||||
// * say Test_A runs in Thread_1
|
||||
// * Test_A spawns another Thread_2
|
||||
// * Thread_1 finishes with Test_A, and moves on to Test_B
|
||||
// * Thread_2 isn't done yet really, crashes and causes an unhandled exception
|
||||
// * we need a way to map this unhandled exception to Test_A, although Test_B is the currently running test
|
||||
//
|
||||
// => what we need is some sort of "thread local" that gets inherited: when
|
||||
// Thread_1 creates Thread_2, it needs to have the same "thread local" values.
|
||||
// that is achieved with `CallContext`.
|
||||
//
|
||||
// Unfortunately, remoting isn't available on every platform (it will
|
||||
// throw PlatformNotSupportedexception), thus we can't support this
|
||||
// scenario. Luckily, this scenario is very rare.
|
||||
|
||||
Container container = null;
|
||||
private static readonly string CONTEXT_KEY = "TestResultName";
|
||||
|
||||
public FinallyDelegate () {
|
||||
@ -73,14 +90,18 @@ namespace NUnit.Framework.Internal
|
||||
/* keep name in LogicalCallContext, because this will be inherited by
|
||||
* Threads spawned by the test case */
|
||||
var guid = Guid.NewGuid();
|
||||
CallContext.SetData(CONTEXT_KEY, new Container(guid));
|
||||
try {
|
||||
CallContext.SetData(CONTEXT_KEY, new Container(guid));
|
||||
} catch {
|
||||
container = new Container (guid);
|
||||
}
|
||||
|
||||
this.lookupTable.Add(guid, result);
|
||||
this.testStack.Push(frame);
|
||||
}
|
||||
|
||||
public void HandleUnhandledExc (Exception ex) {
|
||||
Container c = (Container) CallContext.GetData(CONTEXT_KEY);
|
||||
Container c = container ?? (Container) CallContext.GetData(CONTEXT_KEY);
|
||||
TestResult result = this.lookupTable [c.guid];
|
||||
result.RecordException(ex);
|
||||
result.ThreadCrashFail = true;
|
||||
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "5.10.0.141";
|
||||
public const string MonoVersion = "5.10.0.144";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -1 +1 @@
|
||||
027cdedf223b55ea18d0e1cc2bfe1c9bb9aa0cf5
|
||||
17d71941f008b9d762ca324d866fafb74c4710da
|
@ -1 +1 @@
|
||||
ec34e84d269ff27bc4763a59725cb1f27cb2ae0c
|
||||
6476109f8ed6ff211b4ea34f27d1c116d3c75109
|
@ -1 +1 @@
|
||||
969213b6cefc33120f6b55ea45da40af3be73308
|
||||
0d866f89477a413e0602168cedb677538c26c5a5
|
@ -1 +1 @@
|
||||
db177403ce219d45733074c530b13fee61b9624f
|
||||
8c4410a6c0c7fd0987c68314e9da660f1a09eb02
|
@ -1 +1 @@
|
||||
29812ba06b65a1a07d168ccf5dc54362284ca8ae
|
||||
724ba0ca29a8f94f33c0c2b9cfa478b5513c8ad8
|
@ -1 +1 @@
|
||||
73fae5bfa8d7c4bed4e9f3d3beacb75c13a50615
|
||||
84b06b604c65bfe45810b53017f3ae0faf52520a
|
@ -1 +1 @@
|
||||
bba7bcf2231753be9cc7ade2b695cda5b26c4b56
|
||||
c9899b42c53f78da69acda8a88a613cca6eb8b5b
|
@ -1 +1 @@
|
||||
027cdedf223b55ea18d0e1cc2bfe1c9bb9aa0cf5
|
||||
17d71941f008b9d762ca324d866fafb74c4710da
|
@ -1 +1 @@
|
||||
ec34e84d269ff27bc4763a59725cb1f27cb2ae0c
|
||||
6476109f8ed6ff211b4ea34f27d1c116d3c75109
|
@ -1 +1 @@
|
||||
969213b6cefc33120f6b55ea45da40af3be73308
|
||||
0d866f89477a413e0602168cedb677538c26c5a5
|
@ -1 +1 @@
|
||||
db177403ce219d45733074c530b13fee61b9624f
|
||||
8c4410a6c0c7fd0987c68314e9da660f1a09eb02
|
@ -1 +1 @@
|
||||
29812ba06b65a1a07d168ccf5dc54362284ca8ae
|
||||
724ba0ca29a8f94f33c0c2b9cfa478b5513c8ad8
|
@ -1 +1 @@
|
||||
73fae5bfa8d7c4bed4e9f3d3beacb75c13a50615
|
||||
84b06b604c65bfe45810b53017f3ae0faf52520a
|
@ -1 +1 @@
|
||||
bba7bcf2231753be9cc7ade2b695cda5b26c4b56
|
||||
c9899b42c53f78da69acda8a88a613cca6eb8b5b
|
@ -1 +1 @@
|
||||
027cdedf223b55ea18d0e1cc2bfe1c9bb9aa0cf5
|
||||
17d71941f008b9d762ca324d866fafb74c4710da
|
@ -1 +1 @@
|
||||
ec34e84d269ff27bc4763a59725cb1f27cb2ae0c
|
||||
6476109f8ed6ff211b4ea34f27d1c116d3c75109
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user