You've already forked linux-packaging-mono
Imported Upstream version 6.8.0.73
Former-commit-id: d18deab1b47cfd3ad8cba82b3f37d00eec2170af
This commit is contained in:
parent
bceda29824
commit
73ee7591e8
@@ -250,6 +250,7 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test, ExpectedException (typeof(OperationCanceledException))]
|
||||
[Category ("MultiThreaded")]
|
||||
public void BoundedAddLimit ()
|
||||
{
|
||||
const int elNumber = 5;
|
||||
|
@@ -241,12 +241,14 @@ namespace MonoTests.System.Collections.Concurrent
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
public void AddStressTest ()
|
||||
{
|
||||
CollectionStressTestHelper.AddStressTest (bag);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
public void RemoveStressTest ()
|
||||
{
|
||||
CollectionStressTestHelper.RemoveStressTest (bag, CheckOrderingType.DontCare);
|
||||
|
@@ -129,18 +129,25 @@ namespace MonoTests.System.IO
|
||||
Assert.IsNotNull (watcherHandleField);
|
||||
var proxyType = typeof (FileSystemWatcher).Assembly.GetType ("System.IO.CoreFXFileSystemWatcherProxy");
|
||||
Assert.IsNotNull (proxyType);
|
||||
// the "internal_map" maps watcher handles to backend CoreFX FSW instances
|
||||
var proxyTypeInternalMapField = proxyType.GetField ("internal_map", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
Assert.IsNotNull (proxyTypeInternalMapField);
|
||||
|
||||
var fsw1 = new FileSystemWatcher (tmp.Path, "*");
|
||||
var fsw2 = new FileSystemWatcher (tmp.Path, "*");
|
||||
// at this point watcher and watcher_handle should be set
|
||||
|
||||
global::System.Collections.Generic.IDictionary<object, global::System.IO.CoreFX.FileSystemWatcher> internal_map = null;
|
||||
object handle1 = null;
|
||||
object handle2 = null;
|
||||
|
||||
// using "using" to ensure that Dispose gets called even if we throw an exception
|
||||
using (var fsw11 = fsw1)
|
||||
using (var fsw22 = fsw2) {
|
||||
// at this point watcher and watcher_handle should be set
|
||||
|
||||
// Once at least one FSW is initialized, watcher should be set. But if the
|
||||
// wrong backend is getting used, ignore this test because the other checks
|
||||
// (internal_map in particular) won't be valid.
|
||||
var watcher = watcherField.GetValue (fsw1);
|
||||
Assert.IsNotNull (watcher);
|
||||
if (!proxyType.IsAssignableFrom (watcher.GetType ()))
|
||||
@@ -152,6 +159,17 @@ namespace MonoTests.System.IO
|
||||
Assert.IsNotNull (handle1);
|
||||
Assert.IsNotNull (handle2);
|
||||
|
||||
// Can't check for internal_map earlier - it is lazily created when the first
|
||||
// FSW instance is created
|
||||
internal_map = proxyTypeInternalMapField.GetValue (null)
|
||||
as global::System.Collections.Generic.IDictionary<object, global::System.IO.CoreFX.FileSystemWatcher>;
|
||||
Assert.IsNotNull (internal_map);
|
||||
|
||||
// Both of handles should be in the internal map while the file system watchers
|
||||
// are not disposed.
|
||||
Assert.IsTrue (internal_map.ContainsKey (handle1));
|
||||
Assert.IsTrue (internal_map.ContainsKey (handle2));
|
||||
|
||||
}
|
||||
|
||||
// Dispose was called, now watcher_handle should be null
|
||||
@@ -159,14 +177,6 @@ namespace MonoTests.System.IO
|
||||
Assert.IsNull (watcherHandleField.GetValue (fsw1));
|
||||
Assert.IsNull (watcherHandleField.GetValue (fsw2));
|
||||
|
||||
// and moreover, the CoreFXFileSystemWatcherProxy shouldn't have entries for either handle1 or handle2
|
||||
|
||||
var proxyTypeInternalMapField = proxyType.GetField ("internal_map", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
Assert.IsNotNull (proxyTypeInternalMapField);
|
||||
var internal_map = proxyTypeInternalMapField.GetValue (null)
|
||||
as global::System.Collections.Generic.IDictionary<object, global::System.IO.CoreFX.FileSystemWatcher>;
|
||||
Assert.IsNotNull (internal_map);
|
||||
|
||||
// This pair are the critical checks: after we call Dispose on fsw1 and fsw2, the
|
||||
// backend's internal map shouldn't have anything keyed on handle1 and handle2.
|
||||
// Therefore System.IO.CoreFX.FileSystemWatcher instances will be disposed of, too.
|
||||
|
@@ -7,6 +7,7 @@ using System.Threading;
|
||||
namespace MonoTests.System.Net.NetworkInformation
|
||||
{
|
||||
[TestFixture]
|
||||
[Category("NotWasm")]
|
||||
public partial class PingTest
|
||||
{
|
||||
partial void AndroidShouldPingWork (ref bool shouldWork);
|
||||
@@ -89,6 +90,7 @@ namespace MonoTests.System.Net.NetworkInformation
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
#if MONOTOUCH
|
||||
[Ignore("Ping implementation is broken on MT (requires sudo access)")]
|
||||
#endif
|
||||
@@ -106,6 +108,7 @@ namespace MonoTests.System.Net.NetworkInformation
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
#if MONOTOUCH
|
||||
[Ignore("Ping implementation is broken on MT (requires sudo access)")]
|
||||
#endif
|
||||
|
@@ -15,6 +15,7 @@ using NUnit.Framework;
|
||||
namespace MonoTests.System.Net.Sockets
|
||||
{
|
||||
[TestFixture]
|
||||
[Category("NotWasm")]
|
||||
public class IPv6MulticastOptionTest
|
||||
{
|
||||
[Test] // .ctor (IPAddress)
|
||||
|
@@ -15,6 +15,7 @@ using NUnit.Framework;
|
||||
namespace MonoTests.System.Net.Sockets
|
||||
{
|
||||
[TestFixture]
|
||||
[Category("NotWasm")]
|
||||
public class MulticastOptionTest
|
||||
{
|
||||
[Test] // .ctor (IPAddress)
|
||||
|
@@ -1 +1 @@
|
||||
26abf15ade2510913f1d42482631191500fa985f
|
||||
cc8d3b2e69cd214888cb3ce95f89b1a8c8d81587
|
@@ -26,6 +26,7 @@ using MonoTests.Helpers;
|
||||
namespace MonoTests.System.Net
|
||||
{
|
||||
[TestFixture]
|
||||
[Category("NotWasm")]
|
||||
public class FileWebRequestTest
|
||||
{
|
||||
private TempDirectory _tempDirectory;
|
||||
|
@@ -19,6 +19,7 @@ using MonoTests.Helpers;
|
||||
namespace MonoTests.System.Net
|
||||
{
|
||||
[TestFixture]
|
||||
[Category("NotWasm")]
|
||||
public class FileWebResponseTest
|
||||
{
|
||||
private TempDirectory _tempDirectory;
|
||||
|
@@ -364,6 +364,7 @@ namespace MonoTests.System.Net {
|
||||
ManualResetEvent test_evt;
|
||||
bool test14_error;
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
@@ -502,6 +503,7 @@ namespace MonoTests.System.Net {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
@@ -550,6 +552,7 @@ namespace MonoTests.System.Net {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
@@ -603,6 +606,7 @@ namespace MonoTests.System.Net {
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
@@ -762,6 +766,7 @@ namespace MonoTests.System.Net {
|
||||
// Test case for bug 341443, an pretty old bug, filed on November of 2007.
|
||||
//
|
||||
[Test]
|
||||
[Category("MultiThreaded")]
|
||||
#if FEATURE_NO_BSD_SOCKETS
|
||||
[ExpectedException (typeof (PlatformNotSupportedException))]
|
||||
#endif
|
||||
|
@@ -1 +1 @@
|
||||
0252b387e04bece7b463e77edb0534daf063deb1
|
||||
8140e6616df57c3904842d3847add82df55ae4a6
|
@@ -326,7 +326,8 @@ namespace MonoTests.System.Net {
|
||||
[Test] //BNC#323452
|
||||
// Throws exception with Status == Timeout. The same code behaves as the test expects when run from a regular app.
|
||||
// Might be an issue with the test suite. To investigate.
|
||||
[Category("AndroidNotWorking")]
|
||||
[Category("AndroidNotWorking")]
|
||||
[Category("MultiThreaded")]
|
||||
public void TestFailedConnection ()
|
||||
{
|
||||
try {
|
||||
@@ -353,6 +354,7 @@ namespace MonoTests.System.Net {
|
||||
|
||||
[Test] //BNC#323452
|
||||
[Category ("AndroidNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
|
||||
[Category ("MultiThreaded")]
|
||||
public void TestFailedResolution ()
|
||||
{
|
||||
try {
|
||||
|
@@ -1 +1 @@
|
||||
19f90a2ddd3e19d1ddfdd6cf4302daaa6a2da61f
|
||||
c732b1a7bc6786c5dcd0149235ea1de120147611
|
@@ -329,6 +329,7 @@ namespace MonoTests.System.Timers
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("NotWasm")] // Object.onAbort
|
||||
public void TestRaceCondition ()
|
||||
{
|
||||
Assert.IsTrue (new RaceTest (true).Success, "#1");
|
||||
|
Reference in New Issue
Block a user