You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/11/17 10:52:02 UTC

[39/50] [abbrv] ignite git commit: .NET: Fix code analysis warnings in EntityFramework component

.NET: Fix code analysis warnings in EntityFramework component


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

Branch: refs/heads/ignite-2693
Commit: 767a8a3375f8db50c660e076e885f92e27b324a3
Parents: 058ad50
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Thu Nov 10 10:34:59 2016 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Thu Nov 10 10:34:59 2016 +0300

----------------------------------------------------------------------
 .../EntityFrameworkCacheTest.cs                 | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/767a8a33/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheTest.cs b/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheTest.cs
index cfc9f66..5fbd8fe 100644
--- a/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.EntityFramework.Tests/EntityFrameworkCacheTest.cs
@@ -665,7 +665,7 @@ namespace Apache.Ignite.EntityFramework.Tests
             TestUtils.RunMultiThreaded(CreateRemoveBlog, 4, 20);
 
             // Wait for the cleanup to complete.
-            Thread.Sleep(200);
+            Thread.Sleep(500);
 
             // Only one version of data is in the cache.
             Assert.AreEqual(1, _cache.GetSize());
@@ -908,7 +908,7 @@ namespace Apache.Ignite.EntityFramework.Tests
             }
         }
 
-        private class DelegateCachingPolicy : IDbCachingPolicy
+        private class DelegateCachingPolicy : DbCachingPolicy
         {
             public Func<DbQueryInfo, bool> CanBeCachedFunc { get; set; }
 
@@ -918,24 +918,28 @@ namespace Apache.Ignite.EntityFramework.Tests
 
             public Func<DbQueryInfo, DbCachingMode> GetCachingStrategyFunc { get; set; }
 
-            public bool CanBeCached(DbQueryInfo queryInfo)
+            public override bool CanBeCached(DbQueryInfo queryInfo)
             {
                 return CanBeCachedFunc == null || CanBeCachedFunc(queryInfo);
             }
 
-            public bool CanBeCached(DbQueryInfo queryInfo, int rowCount)
+            public override bool CanBeCached(DbQueryInfo queryInfo, int rowCount)
             {
                 return CanBeCachedRowsFunc == null || CanBeCachedRowsFunc(queryInfo, rowCount);
             }
 
-            public TimeSpan GetExpirationTimeout(DbQueryInfo queryInfo)
+            public override TimeSpan GetExpirationTimeout(DbQueryInfo queryInfo)
             {
-                return GetExpirationTimeoutFunc == null ? TimeSpan.MaxValue : GetExpirationTimeoutFunc(queryInfo);
+                return GetExpirationTimeoutFunc == null 
+                    ? base.GetExpirationTimeout(queryInfo) 
+                    : GetExpirationTimeoutFunc(queryInfo);
             }
 
-            public DbCachingMode GetCachingMode(DbQueryInfo queryInfo)
+            public override DbCachingMode GetCachingMode(DbQueryInfo queryInfo)
             {
-                return GetCachingStrategyFunc == null ? DbCachingMode.ReadWrite : GetCachingStrategyFunc(queryInfo);
+                return GetCachingStrategyFunc == null 
+                    ? base.GetCachingMode(queryInfo)
+                    : GetCachingStrategyFunc(queryInfo);
             }
         }
     }