You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by di...@apache.org on 2011/05/04 09:02:11 UTC
[Lucene.Net] svn commit: r1099339 - in
/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core:
PartiallyTrustedAppDomain.cs TestSupportClass.cs
Author: digy
Date: Wed May 4 07:02:11 2011
New Revision: 1099339
URL: http://svn.apache.org/viewvc?rev=1099339&view=rev
Log:
[LUCENENET-413] [LUCENENET-412]
Modified:
incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/PartiallyTrustedAppDomain.cs
incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/TestSupportClass.cs
Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/PartiallyTrustedAppDomain.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/PartiallyTrustedAppDomain.cs?rev=1099339&r1=1099338&r2=1099339&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/PartiallyTrustedAppDomain.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/PartiallyTrustedAppDomain.cs Wed May 4 07:02:11 2011
@@ -60,7 +60,12 @@ namespace Lucene.Net.Test
System.Globalization.CultureInfo.CurrentCulture,
null);
- object ret = clazz.InvokeMember(methodName, BindingFlags.InvokeMethod, null, obj, methodArgs);
+ object ret = clazz.InvokeMember(
+ methodName,
+ BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic,
+ null,
+ obj,
+ methodArgs);
return ret;
}
catch (TypeLoadException tlex)
Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/TestSupportClass.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/TestSupportClass.cs?rev=1099339&r1=1099338&r2=1099339&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/TestSupportClass.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/TestSupportClass.cs Wed May 4 07:02:11 2011
@@ -1240,6 +1240,28 @@ namespace Lucene.Net._SupportClass
Lucene.Net.Test.PartiallyTrustedAppDomain.Run(typeof(Lucene.Net.Search.SortField), "GetUseLegacySearch", new object[]{"field"}, null);
}
+ [Test]
+ public void Test_AlreadyClosedException()
+ {
+ Lucene.Net.Test.PartiallyTrustedAppDomain.Run(this.GetType(), "Test_AlreadyClosedException2", null, null);
+ }
+
+ void Test_AlreadyClosedException2()
+ {
+ try
+ {
+ AlreadyClosedException ace = new AlreadyClosedException("Test");
+ System.Runtime.Serialization.Formatters.Binary.BinaryFormatter bf = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter();
+ System.IO.MemoryStream ms = new System.IO.MemoryStream();
+ bf.Serialize(ms, ace);
+ ms.Seek(0, System.IO.SeekOrigin.Begin);
+ AlreadyClosedException ace2 = (AlreadyClosedException)bf.Deserialize(ms);
+ throw ace2;
+ }
+ catch (AlreadyClosedException)
+ {
+ }
+ }
[Test]