lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [1/3] git commit: porting initial code for RamUsageEstimater, SystemProps, Constants and HashMap. Changing the portable library version to use .net 4.5.1 in order to use the pcl version of Microsoft.Framework.Configuration.
Date Thu, 24 Jul 2014 03:15:37 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/pcl 2cc449a80 -> bde2c1400


porting initial code for RamUsageEstimater, SystemProps, Constants and HashMap. Changing the
portable library version to use .net 4.5.1 in order to use the pcl version of Microsoft.Framework.Configuration.


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/d72389b3
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/d72389b3
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/d72389b3

Branch: refs/heads/pcl
Commit: d72389b36446ec897bc456e9a42015b6abed48b2
Parents: 2cc449a
Author: Michael Herndon <mherndon@michaelherndon.com>
Authored: Wed Jul 23 02:46:11 2014 -0400
Committer: Michael Herndon <mherndon@michaelherndon.com>
Committed: Wed Jul 23 02:46:11 2014 -0400

----------------------------------------------------------------------
 src/Lucene.Net.Core/Lucene.Net.Core.csproj      |  30 +++-
 src/Lucene.Net.Core/Lucene.Net.Core.kproj       |   5 +
 src/Lucene.Net.Core/Support/EnumUtil.cs         |   2 +-
 src/Lucene.Net.Core/project.json                |   2 +
 .../Lucene.Net.Core.Tests.csproj                |   7 +-
 .../Lucene.Net.Core.Tests.kproj                 |   1 +
 .../Util/BaseSorterTestCase.cs                  |   2 +-
 .../Util/TestRamEstimatorUsage.cs               | 156 +++++++++++++++++++
 .../Lucene.Net.TestFramework.csproj             |   6 +-
 .../Util/LuceneTestCase.cs                      |   4 +-
 10 files changed, 199 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d72389b3/src/Lucene.Net.Core/Lucene.Net.Core.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Lucene.Net.Core.csproj b/src/Lucene.Net.Core/Lucene.Net.Core.csproj
index 2fa8c2c..61206c3 100644
--- a/src/Lucene.Net.Core/Lucene.Net.Core.csproj
+++ b/src/Lucene.Net.Core/Lucene.Net.Core.csproj
@@ -22,7 +22,7 @@
 <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
   <PropertyGroup>
-    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     <ProjectGuid>{AD8901C0-209D-4132-80AA-257DBACEECB4}</ProjectGuid>
@@ -33,8 +33,10 @@
     <DefaultLanguage>en-US</DefaultLanguage>
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Profile151</TargetFrameworkProfile>
+    <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
+    <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+    <RestorePackages>true</RestorePackages>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -54,13 +56,11 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
-    <!-- A reference to the entire .NET Framework is automatically included -->
-  </ItemGroup>
-  <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Check.cs" />
     <Compile Include="Support\DeepCloneNotSupportedException.cs" />
     <Compile Include="Support\EnumUtil.cs" />
+    <Compile Include="Support\HashMap.cs" />
     <Compile Include="Support\ICloneable.cs" />
     <Compile Include="Support\SerializableAttribute.cs" />
     <Compile Include="Support\ShallowCloneNotSupportedException.cs" />
@@ -69,14 +69,32 @@
     <Compile Include="Util\ArrayInPlaceMergeSorter`.cs" />
     <Compile Include="Util\ArrayUtil.cs" />
     <Compile Include="Util\Bits.cs" />
+    <Compile Include="Util\Constants.cs" />
     <Compile Include="Util\IAccountable.cs" />
     <Compile Include="Util\IAttribute.cs" />
     <Compile Include="Util\IBits.cs" />
     <Compile Include="Util\InPlaceMergeSorter.cs" />
+    <Compile Include="Util\RamUsageEstimator.cs" />
     <Compile Include="Util\Sorter.cs" />
+    <Compile Include="Util\SystemProp.cs" />
     <Compile Include="Util\Version.cs" />
   </ItemGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.Framework.ConfigurationModel">
+      <HintPath>..\..\packages\Microsoft.Framework.ConfigurationModel.1.0.0-alpha3-10137\lib\portable-net451+win81+wpa81\Microsoft.Framework.ConfigurationModel.dll</HintPath>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="packages.config" />
+  </ItemGroup>
   <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets"
/>
+  <Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')"
/>
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>This project references NuGet package(s) that are missing on this
computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105.
The missing file is {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)',
'$(SolutionDir)\.nuget\NuGet.targets'))" />
+  </Target>
   <!-- To modify your build process, add your task inside one of the targets below and
uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
   <Target Name="BeforeBuild">

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d72389b3/src/Lucene.Net.Core/Lucene.Net.Core.kproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Lucene.Net.Core.kproj b/src/Lucene.Net.Core/Lucene.Net.Core.kproj
index 02db3a0..9bb051d 100644
--- a/src/Lucene.Net.Core/Lucene.Net.Core.kproj
+++ b/src/Lucene.Net.Core/Lucene.Net.Core.kproj
@@ -47,6 +47,7 @@
   </PropertyGroup>
   <ItemGroup>
     <Content Include="default.ruleset" />
+    <Content Include="packages.config" />
     <Content Include="project.json" />
   </ItemGroup>
   <ItemGroup>
@@ -54,6 +55,7 @@
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Support\DeepCloneNotSupportedException.cs" />
     <Compile Include="Support\EnumUtil.cs" />
+    <Compile Include="Support\HashMap.cs" />
     <Compile Include="Support\ICloneable.cs" />
     <Compile Include="Support\SerializableAttribute.cs" />
     <Compile Include="Support\ShallowCloneNotSupportedException.cs" />
@@ -62,11 +64,14 @@
     <Compile Include="Util\ArrayInPlaceMergeSorter`.cs" />
     <Compile Include="Util\ArrayUtil.cs" />
     <Compile Include="Util\Bits.cs" />
+    <Compile Include="Util\Constants.cs" />
     <Compile Include="Util\IAccountable.cs" />
     <Compile Include="Util\IAttribute.cs" />
     <Compile Include="Util\IBits.cs" />
     <Compile Include="Util\InPlaceMergeSorter.cs" />
+    <Compile Include="Util\RamUsageEstimator.cs" />
     <Compile Include="Util\Sorter.cs" />
+    <Compile Include="Util\SystemProp.cs" />
     <Compile Include="Util\Version.cs" />
   </ItemGroup>
   <Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)'
!= ''" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d72389b3/src/Lucene.Net.Core/Support/EnumUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/EnumUtil.cs b/src/Lucene.Net.Core/Support/EnumUtil.cs
index 4d1ed6b..43f6958 100644
--- a/src/Lucene.Net.Core/Support/EnumUtil.cs
+++ b/src/Lucene.Net.Core/Support/EnumUtil.cs
@@ -35,7 +35,7 @@ namespace Lucene.Net
         /// <exception cref="System.ArgumentException">Throws when T is not an enum.</exception>
         /// <returns>Returns an IEnumerable&lt;T&gt; of enum values for type
T.</returns>
         public static IList<T> ValuesOf<T>()
-        {
+        { 
             // TODO: 5.0 resource: put exception message in resource.
             if (!typeof(T).GetTypeInfo().IsEnum)
                 throw new ArgumentException("Type of T must be an enum");

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d72389b3/src/Lucene.Net.Core/project.json
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/project.json b/src/Lucene.Net.Core/project.json
index 09d42b7..c00b765 100644
--- a/src/Lucene.Net.Core/project.json
+++ b/src/Lucene.Net.Core/project.json
@@ -1,6 +1,7 @@
 {
     "licenses": ["apache 2.0"],
     "dependencies": {
+        "Microsoft.Framework.ConfigurationModel": "1.0.0-alpha2"
     },
     "license": "apache 2.0",
     "configurations" : {
@@ -13,6 +14,7 @@
                 "System.Linq": "",
                 "System.Reflection": "",
                 "System.Runtime": "",
+                "System.Reflection.Extensions": "",
                 "System.Text.RegularExpressions": "",
                 "System.Diagnostics.Debug": ""
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d72389b3/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.csproj
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.csproj b/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.csproj
index cae08cf..5a31c2c 100644
--- a/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.csproj
+++ b/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.csproj
@@ -23,7 +23,7 @@
   <Import Project="..\..\packages\xunit.core.2.0.0-beta-build2700\build\portable-net45+win+wpa81+wp80\xunit.core.props"
Condition="Exists('..\..\packages\xunit.core.2.0.0-beta-build2700\build\portable-net45+win+wpa81+wp80\xunit.core.props')"
/>
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
   <PropertyGroup>
-    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     <ProjectGuid>{C879C7A6-FBE5-4F22-B363-A4356C7B8E76}</ProjectGuid>
@@ -34,8 +34,8 @@
     <DefaultLanguage>en-US</DefaultLanguage>
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Profile151</TargetFrameworkProfile>
+    <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
     <RestorePackages>true</RestorePackages>
   </PropertyGroup>
@@ -62,6 +62,7 @@
     <Compile Include="Util\BaseSorterTestCase.cs" />
     <Compile Include="Util\TestBits.cs" />
     <Compile Include="Util\TestInPlaceMergeSorter.cs" />
+    <Compile Include="Util\TestRamEstimatorUsage.cs" />
     <Compile Include="Util\TestVersion.cs" />
   </ItemGroup>
   <ItemGroup>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d72389b3/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.kproj
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.kproj b/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.kproj
index 5a07e06..17c2ff7 100644
--- a/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.kproj
+++ b/test/Lucene.Net.Core.Tests/Lucene.Net.Core.Tests.kproj
@@ -56,6 +56,7 @@
     <Compile Include="Util\BaseSorterTestCase.cs" />
     <Compile Include="Util\TestBits.cs" />
     <Compile Include="Util\TestInPlaceMergeSorter.cs" />
+    <Compile Include="Util\TestRamEstimatorUsage.cs" />
     <Compile Include="Util\TestVersion.cs" />
   </ItemGroup>
   <Import Project="$(VSToolsPath)\AspNet\Microsoft.Web.AspNet.targets" Condition="'$(VSToolsPath)'
!= ''" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d72389b3/test/Lucene.Net.Core.Tests/Util/BaseSorterTestCase.cs
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/Util/BaseSorterTestCase.cs b/test/Lucene.Net.Core.Tests/Util/BaseSorterTestCase.cs
index 0b41443..693acac 100644
--- a/test/Lucene.Net.Core.Tests/Util/BaseSorterTestCase.cs
+++ b/test/Lucene.Net.Core.Tests/Util/BaseSorterTestCase.cs
@@ -184,7 +184,7 @@ namespace Lucene.Net.Util
         /// of order.
         /// 
         /// This could be caused by the differences in implementation of Array.Sort, the
Java version of Array.sort
-        /// and the SortRange impelementation.
+        /// and the SortRange implementation.
         /// 
         ///  To work around this for the short term, the minValue is currently constrained
to have a minValue of 1 and
         ///  RANDOM_LOW_CARDINALITY strategy currently omits checking for matching ordinal
positions.

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d72389b3/test/Lucene.Net.Core.Tests/Util/TestRamEstimatorUsage.cs
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.Core.Tests/Util/TestRamEstimatorUsage.cs b/test/Lucene.Net.Core.Tests/Util/TestRamEstimatorUsage.cs
new file mode 100644
index 0000000..5e9af0b
--- /dev/null
+++ b/test/Lucene.Net.Core.Tests/Util/TestRamEstimatorUsage.cs
@@ -0,0 +1,156 @@
+/* 
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+
+
+namespace Lucene.Net.Util
+{
+    using System;
+    using Lucene.Net.TestFramework;
+    using System.Diagnostics.CodeAnalysis;
+
+    public class TestRamUsageEstimator : LuceneTestCase
+    {
+
+        [Test(Skip = "RamUsageTester has not been ported.")]
+        public void TestSanity()
+        {
+            var size = RamUsageEstimator.SizeOf("test string".ToCharArray());
+            var shallowSize = RamUsageEstimator.ShallowSizeOfInstance(typeof(string));
+
+            Ok(size > shallowSize, "the size {0} must be greater than the shallow size
{1}", size, shallowSize);
+
+            var holder = new Holder { holder = new Holder("string2", 5000L) };
+            Ok(RamUsageEstimator.SizeOf(holder) > RamUsageEstimator.ShallowSizeOfInstance(typeof(Holder)));
+            Ok(RamUsageEstimator.SizeOf(holder) > RamUsageEstimator.SizeOf(holder.holder));
+
+            Ok(RamUsageEstimator.ShallowSizeOfInstance(typeof(HolderSubclass)) >= RamUsageEstimator.ShallowSizeOfInstance(typeof(Holder)));
+            Ok(RamUsageEstimator.ShallowSizeOfInstance(typeof(Holder)) == RamUsageEstimator.ShallowSizeOfInstance(typeof(HolderSubclass2)));
+
+            var strings = new string[] {
+                    "test string",
+                    "hollow",
+                    "catchmaster"
+                };
+            Ok(RamUsageEstimator.SizeOf((object)strings) > RamUsageEstimator.ShallowSizeOf(strings));
+        }
+
+        [Test]
+        public void TestStaticOverloads()
+        {
+            var rnd = new Random();
+            {
+                var array = new byte[rnd.Next(1024)];
+                Equal(RamUsageEstimator.SizeOf(array), RamUsageEstimator.SizeOf((Object)array));
+            }
+
+            {
+                var array = new bool[rnd.Next(1024)];
+                Equal(RamUsageEstimator.SizeOf(array), RamUsageEstimator.SizeOf((Object)array));
+            }
+
+            {
+                var array = new char[rnd.Next(1024)];
+                Equal(RamUsageEstimator.SizeOf(array), RamUsageEstimator.SizeOf((Object)array));
+            }
+
+            {
+                var array = new short[rnd.Next(1024)];
+                Equal(RamUsageEstimator.SizeOf(array), RamUsageEstimator.SizeOf((Object)array));
+            }
+
+            {
+                var array = new int[rnd.Next(1024)];
+                Equal(RamUsageEstimator.SizeOf(array), RamUsageEstimator.SizeOf((Object)array));
+            }
+
+            {
+                var array = new float[rnd.Next(1024)];
+                Equal(RamUsageEstimator.SizeOf(array), RamUsageEstimator.SizeOf((Object)array));
+            }
+
+            {
+                var array = new long[rnd.Next(1024)];
+                Equal(RamUsageEstimator.SizeOf(array), RamUsageEstimator.SizeOf((Object)array));
+            }
+
+            {
+                var array = new double[rnd.Next(1024)];
+                Equal(RamUsageEstimator.SizeOf(array), RamUsageEstimator.SizeOf((Object)array));
+            }
+        }
+
+        [Test]
+        public void TestReferenceSize()
+        {
+            /* There really is not an something similar to sun.misc.unsafe in C#
+            if (!IsSupportedJVM())
+            {
+                Console.Error.WriteLine("WARN: Your JVM does not support certain Oracle/Sun
extensions.");
+                Console.Error.WriteLine(" Memory estimates may be inaccurate.");
+                Console.Error.WriteLine(" Please report this to the Lucene mailing list.");
+                Console.Error.WriteLine("JVM version: " + RamUsageEstimator.JVM_INFO_STRING);
+                Console.Error.WriteLine("UnsupportedFeatures:");
+                foreach (var f in RamUsageEstimator.GetUnsupportedFeatures())
+                {
+                    Console.Error.Write(" - " + f.ToString());
+                    if (f == RamUsageEstimator.JvmFeature.OBJECT_ALIGNMENT)
+                    {
+                        Console.Error.Write("; Please note: 32bit Oracle/Sun VMs don't allow
exact OBJECT_ALIGNMENT retrieval, this is a known issue.");
+                    }
+                    Console.Error.WriteLine();
+                }
+            } */
+
+            Ok(RamUsageEstimator.NUM_BYTES_OBJECT_REF == 4 || RamUsageEstimator.NUM_BYTES_OBJECT_REF
== 8);
+            if (!Constants.KRE_IS_64BIT)
+            {
+                Ok(4 == RamUsageEstimator.NUM_BYTES_OBJECT_REF, "For 32bit JVMs, reference
size must always be 4?");
+            }
+        }
+
+#pragma warning disable 0169
+        private class Holder
+        {
+            long field1 = 5000L;
+            string name = "name";
+            public Holder holder;
+            long field2, field3, field4;
+
+            public Holder() { }
+
+            public Holder(string name, long field1)
+            {
+                this.name = name;
+                this.field1 = field1;
+            }
+        }
+
+        private class HolderSubclass : Holder
+        {
+            byte foo;
+            int bar;
+        }
+
+        private class HolderSubclass2 : Holder
+        {
+            // empty, only inherits all fields -> size should be identical to superclass
+        }
+#pragma warning restore 0169
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d72389b3/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj b/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
index 80cedc8..b0ef34b 100644
--- a/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
+++ b/test/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
@@ -23,7 +23,7 @@
   <Import Project="..\..\packages\xunit.core.2.0.0-beta-build2700\build\portable-net45+win+wpa81+wp80\xunit.core.props"
Condition="Exists('..\..\packages\xunit.core.2.0.0-beta-build2700\build\portable-net45+win+wpa81+wp80\xunit.core.props')"
/>
   <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
   <PropertyGroup>
-    <MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
+    <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
     <ProjectGuid>{F0D68FEA-B118-43B6-B760-3FB75CDE766D}</ProjectGuid>
@@ -34,8 +34,8 @@
     <DefaultLanguage>en-US</DefaultLanguage>
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-    <TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
-    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetFrameworkProfile>Profile151</TargetFrameworkProfile>
+    <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
     <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
     <RestorePackages>true</RestorePackages>
   </PropertyGroup>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d72389b3/test/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
----------------------------------------------------------------------
diff --git a/test/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/test/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
index 122a3f1..d46a3c0 100644
--- a/test/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
+++ b/test/Lucene.Net.TestFramework/Util/LuceneTestCase.cs
@@ -35,8 +35,8 @@ namespace Lucene.Net.TestFramework
         static LuceneTestCase()
         {
             random = new ThreadLocal<System.Random>(() => {
-                
-                Thread.Sleep(20);
+
+              
                 return new System.Random((int) DateTime.Now.Ticks & 0x0000FFFF);
             });
         }


Mime
View raw message