lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r568808 - /incubator/lucene.net/trunk/C#/src/Test/Store/TestLockFactory.cs
Date Thu, 23 Aug 2007 02:13:33 GMT
Author: aroush
Date: Wed Aug 22 19:13:32 2007
New Revision: 568808

URL: http://svn.apache.org/viewvc?rev=568808&view=rev
Log:
Fixed TestNativeFSLockFactory() test case

Modified:
    incubator/lucene.net/trunk/C#/src/Test/Store/TestLockFactory.cs

Modified: incubator/lucene.net/trunk/C#/src/Test/Store/TestLockFactory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Store/TestLockFactory.cs?rev=568808&r1=568807&r2=568808&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Store/TestLockFactory.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Store/TestLockFactory.cs Wed Aug 22 19:13:32 2007
@@ -220,10 +220,9 @@
 		{
             Assert.Fail("TestLockClassProperty() needs conversion to C#");
 
-			/*
             System.String indexDirName = "index.TestLockFactory3";
 			
-			System_Renamed.setProperty("Lucene.Net.Store.FSDirectoryLockFactoryClass", "Lucene.Net.Store.NoLockFactory");
+			//System.Configuration.ConfigurationSettings.AppSettings.Set("Lucene.Net.Store.FSDirectoryLockFactoryClass",
"Lucene.Net.Store.NoLockFactory");
 			
 			IndexWriter writer = new IndexWriter(indexDirName, new WhitespaceAnalyzer(), true);
 			
@@ -231,12 +230,11 @@
 			
 			// Put back to the correct default for subsequent tests:
 			// System.clearProperty("Lucene.Net.Store.FSDirectoryLockFactoryClass");
-			System_Renamed.setProperty("Lucene.Net.Store.FSDirectoryLockFactoryClass", "");
+			//System.Configuration.ConfigurationSettings.AppSettings.Set("Lucene.Net.Store.FSDirectoryLockFactoryClass",
"");
 			
 			writer.Close();
 			// Cleanup
 			RmDir(indexDirName);
-            */
 		}
 		
 		// Verify: setDisableLocks works
@@ -369,11 +367,11 @@
         [Test]
 		public virtual void  TestNativeFSLockFactory()
 		{
-            Assert.Fail("TestLockClassProperty() needs conversion to C#");
+            System.String altTempDir = System.IO.Path.GetTempPath();
 
-			NativeFSLockFactory f = new NativeFSLockFactory(SupportClass.AppSettings.Get("tempDir",
""));
+			NativeFSLockFactory f = new NativeFSLockFactory(SupportClass.AppSettings.Get("tempDir",
altTempDir));
 			
-			NativeFSLockFactory f2 = new NativeFSLockFactory(SupportClass.AppSettings.Get("tempDir",
""));
+			NativeFSLockFactory f2 = new NativeFSLockFactory(SupportClass.AppSettings.Get("tempDir",
altTempDir));
 			
 			f.SetLockPrefix("test");
 			Lock l = f.MakeLock("commit");



Mime
View raw message