You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2017/02/13 10:32:24 UTC
[27/31] ignite git commit: .NET: Extract exceptions tests in
CacheStoreTest and ignore due to IGNITE-4657
.NET: Extract exceptions tests in CacheStoreTest and ignore due to IGNITE-4657
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/543a65fb
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/543a65fb
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/543a65fb
Branch: refs/heads/ignite-4436-2
Commit: 543a65fbac20a6961f8d23baaeb6ff8c6c61f20d
Parents: a600caf
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Mon Feb 6 18:07:28 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Fri Feb 10 12:45:07 2017 +0300
----------------------------------------------------------------------
.../Cache/Store/CacheStoreTest.cs | 30 ++++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/543a65fb/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
index 869336c..a66aea8 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Store/CacheStoreTest.cs
@@ -208,12 +208,38 @@ namespace Apache.Ignite.Core.Tests.Cache.Store
Assert.AreEqual("val", cache.Get(1));
Assert.AreEqual(1, cache.GetSize());
+ }
+
+ [Test]
+ public void TestExceptions()
+ {
+ var cache = GetCache();
+
+ cache.Put(1, "val");
- // Test errors
CacheTestStore.ThrowError = true;
CheckCustomStoreError(Assert.Throws<CacheStoreException>(() => cache.Put(-2, "fail")).InnerException);
- cache.LocalEvict(new[] { 1 });
+ cache.LocalEvict(new[] {1});
+ CheckCustomStoreError(Assert.Throws<CacheStoreException>(() => cache.Get(1)).InnerException);
+
+ CacheTestStore.ThrowError = false;
+
+ cache.Remove(1);
+ }
+
+ [Test]
+ [Ignore("IGNITE-4657")]
+ public void TestExceptionsNoRemove()
+ {
+ var cache = GetCache();
+
+ cache.Put(1, "val");
+
+ CacheTestStore.ThrowError = true;
+ CheckCustomStoreError(Assert.Throws<CacheStoreException>(() => cache.Put(-2, "fail")).InnerException);
+
+ cache.LocalEvict(new[] {1});
CheckCustomStoreError(Assert.Throws<CacheStoreException>(() => cache.Get(1)).InnerException);
}