public void TestCreatesAndUpdates() { o_region = new RegionOperation(RegionName); o_region.Region.Add("Key-1", "Val-1", m_callbackarg); o_region.Region.Put("Key-1", "NewVal-1", m_callbackarg); Thread.Sleep(10000); }
public void ValidateData() { o_region = new RegionOperation(RegionName); DefaultType dc = (DefaultType)o_region.Region.Get("key-1", null); Assert.AreEqual(dc.CBool, true, "bool is not equal"); Assert.AreEqual(dc.CInt, 1000, "int is not equal"); int[] cia = dc.CIntArray; Assert.IsNotNull(cia, "Int array is null"); Assert.AreEqual(3, cia.Length, "Int array are not three"); string[] csa = dc.CStringArray; Assert.IsNotNull(csa, "String array is null"); Assert.AreEqual(2, csa.Length, "String array length is not two"); Assert.AreEqual(dc.CFileName, "gemstone.txt", "Cacheable filename is not equal"); /* * Assert.IsNotNull(dc.CHashSet, "hashset is null"); * Assert.AreEqual(2, dc.CHashSet.Count, "hashset size is not two"); * */ Assert.IsNotNull(dc.CHashMap, "hashmap is null"); Assert.AreEqual(1, dc.CHashMap.Count, "hashmap size is not one"); //Assert.IsNotNull(dc.CDate, "Date is null"); Assert.IsNotNull(dc.CVector); Assert.AreEqual(2, dc.CVector.Count, "Vector size is not two"); //Assert.IsNotNull(dc.CObject); //Assert.AreEqual("key", ((CustomSerializableObject)dc.CObject).key, "Object key is not same"); //Assert.AreEqual("value", ((CustomSerializableObject)dc.CObject).value, "Object value is not same"); }
public void SuspendResumeCommit() { o_region1 = new RegionOperation(cstxRegions[0]); o_region2 = new RegionOperation(cstxRegions[1]); CacheHelper.CSTXManager.Begin(); o_region1.PutOp(1, null); o_region2.PutOp(1, null); Assert.AreEqual(CacheHelper.CSTXManager.IsSuspended(CacheHelper.CSTXManager.TransactionId), false, "Transaction should not be suspended"); Assert.AreEqual(CacheHelper.CSTXManager.Exists(CacheHelper.CSTXManager.TransactionId), true, "Transaction should exist"); Assert.AreEqual(2, o_region1.Region.Keys.Count, "There should be two values in the region before commit"); Assert.AreEqual(2, o_region2.Region.Keys.Count, "There should be two values in the region before commit"); TransactionId tid = CacheHelper.CSTXManager.Suspend(); Assert.AreEqual(CacheHelper.CSTXManager.IsSuspended(tid), true, "Transaction should be suspended"); Assert.AreEqual(CacheHelper.CSTXManager.Exists(tid), true, "Transaction should exist"); Assert.AreEqual(0, o_region1.Region.Keys.Count, "There should be 0 values in the region after suspend"); Assert.AreEqual(0, o_region2.Region.Keys.Count, "There should be 0 values in the region after suspend"); CacheHelper.CSTXManager.Resume(tid); Assert.AreEqual(CacheHelper.CSTXManager.TryResume(tid), false, "The transaction should not have been resumed again."); Assert.AreEqual(CacheHelper.CSTXManager.IsSuspended(tid), false, "Transaction should not be suspended"); Assert.AreEqual(CacheHelper.CSTXManager.Exists(tid), true, "Transaction should exist"); Assert.AreEqual(2, o_region1.Region.Keys.Count, "There should be two values in the region before commit"); Assert.AreEqual(2, o_region2.Region.Keys.Count, "There should be two values in the region before commit"); o_region2.PutOp(2, null); Assert.AreEqual(2, o_region1.Region.Keys.Count, "There should be four values in the region before commit"); Assert.AreEqual(4, o_region2.Region.Keys.Count, "There should be four values in the region before commit"); CacheHelper.CSTXManager.Commit(); Assert.AreEqual(CacheHelper.CSTXManager.IsSuspended(tid), false, "Transaction should not be suspended"); Assert.AreEqual(CacheHelper.CSTXManager.Exists(tid), false, "Transaction should NOT exist"); Assert.AreEqual(CacheHelper.CSTXManager.TryResume(tid), false, "Transaction should not be resumed"); Assert.AreEqual(CacheHelper.CSTXManager.TryResume(tid, TimeSpan.FromMilliseconds(3000)), false, "Transaction should not be resumed"); Assert.AreEqual(2, o_region1.Region.Keys.Count, "There should be four values in the region after commit"); Assert.AreEqual(4, o_region2.Region.Keys.Count, "There should be four values in the region after commit"); o_region1.DestroyOpWithPdxValue(1, null); o_region2.DestroyOpWithPdxValue(2, null); bool resumeEx = false; try { CacheHelper.CSTXManager.Resume(tid); } catch (IllegalStateException) { resumeEx = true; } Assert.AreEqual(resumeEx, true, "The transaction should not be resumed"); // The transaction should not be suspended // Assert.Throws<Exception>( delegate { CacheHelper.CSTXManager.Suspend(); }); }
public void CallOp2() { o_region = new RegionOperation(RegionName); DefaultType dc = new DefaultType(true); o_region.Region.Put("key-1", dc, null); Thread.Sleep(1000); // let the events reach at other end. }
public void GetOp(string key) { Util.Log("GetOp started"); o_region = new RegionOperation(RegionName); Region r = o_region.Region; Object val = r[key]; Thread.Sleep(1000); // let the events reach at other end. Util.Log("GetOp finished"); }
public void InvalidateOp(string key) { Util.Log("InvalidateOp started"); o_region = new RegionOperation(RegionName); Region r = o_region.Region; r.GetLocalView().Invalidate(key); Thread.Sleep(1000); // let the events reach at other end. Util.Log("InvalidateOp finished"); }
public void PutOp(string key, string value) { Util.Log("PutOp started"); o_region = new RegionOperation(RegionName); Region r = o_region.Region; r[key] = value; Thread.Sleep(1000); // let the events reach at other end. Util.Log("PutOp finished"); }
public void SuspendResumeRollback() { o_region1 = new RegionOperation(cstxRegions[0]); o_region2 = new RegionOperation(cstxRegions[1]); CacheHelper.CSTXManager.Begin(); o_region1.PutOp(1, null); o_region2.PutOp(1, null); Assert.AreEqual(CacheHelper.CSTXManager.IsSuspended(CacheHelper.CSTXManager.TransactionId), false, "Transaction should not be suspended"); Assert.AreEqual(CacheHelper.CSTXManager.Exists(CacheHelper.CSTXManager.TransactionId), true, "Transaction should exist"); Assert.AreEqual(2, o_region1.Region.Keys.Count, "There should be two values in the region before commit"); Assert.AreEqual(2, o_region2.Region.Keys.Count, "There should be two values in the region before commit"); TransactionId tid = CacheHelper.CSTXManager.Suspend(); Assert.AreEqual(CacheHelper.CSTXManager.IsSuspended(tid), true, "Transaction should be suspended"); Assert.AreEqual(CacheHelper.CSTXManager.Exists(tid), true, "Transaction should exist"); Assert.AreEqual(0, o_region1.Region.Keys.Count, "There should be 0 values in the region after suspend"); Assert.AreEqual(0, o_region2.Region.Keys.Count, "There should be 0 values in the region after suspend"); CacheHelper.CSTXManager.Resume(tid); Assert.AreEqual(CacheHelper.CSTXManager.IsSuspended(tid), false, "Transaction should not be suspended"); Assert.AreEqual(CacheHelper.CSTXManager.Exists(tid), true, "Transaction should exist"); Assert.AreEqual(2, o_region1.Region.Keys.Count, "There should be two values in the region before commit"); Assert.AreEqual(2, o_region2.Region.Keys.Count, "There should be two values in the region before commit"); o_region2.PutOp(2, null); Assert.AreEqual(2, o_region1.Region.Keys.Count, "There should be four values in the region before commit"); Assert.AreEqual(4, o_region2.Region.Keys.Count, "There should be four values in the region before commit"); CacheHelper.CSTXManager.Rollback(); Assert.AreEqual(CacheHelper.CSTXManager.IsSuspended(tid), false, "Transaction should not be suspended"); Assert.AreEqual(CacheHelper.CSTXManager.Exists(tid), false, "Transaction should NOT exist"); Assert.AreEqual(CacheHelper.CSTXManager.TryResume(tid), false, "Transaction should not be resumed"); Assert.AreEqual(CacheHelper.CSTXManager.TryResume(tid, 3000), false, "Transaction should not be resumed"); Assert.AreEqual(0, o_region1.Region.Keys.Count, "There should be 0 values in the region after rollback"); Assert.AreEqual(0, o_region2.Region.Keys.Count, "There should be 0 values in the region after rollback"); bool resumeEx = false; try { CacheHelper.CSTXManager.Resume(tid); } catch (IllegalStateException) { resumeEx = true; } Assert.AreEqual(resumeEx, true, "The transaction should not be resumed"); }
public void TestRemoveAll() { o_region = new RegionOperation(RegionName); ICollection <object> keys = new LinkedList <object>(); for (int i = 0; i < 10; i++) { o_region.Region["Key-" + i] = "Value-" + i; keys.Add("Key-" + i); } o_region.Region.RemoveAll(keys, m_callbackarg); }
public void CallOp() { o_region = new RegionOperation(RegionName); o_region.PutOp(5, null); Thread.Sleep(1000); // let the events reach at other end. o_region.PutOp(5, null); Thread.Sleep(1000); o_region.InvalidateOp(5, null); Thread.Sleep(1000); o_region.DestroyOp(5, null); Thread.Sleep(1000); }
public void TestPutAll() { o_region = new RegionOperation(RegionName); Dictionary <Object, Object> entryMap = new Dictionary <Object, Object>(); for (Int32 item = 0; item < 10; item++) { int K = item; string value = item.ToString(); entryMap.Add(K, value); } o_region.Region.PutAll(entryMap, 15, m_callbackarg); }
public void TestInvalidates() { o_region = new RegionOperation(RegionName); o_region.Region.GetLocalView().Add(1234, 1234, m_callbackarg); o_region.Region.GetLocalView().Add(12345, 12345, m_callbackarg); o_region.Region.GetLocalView().Add(12346, 12346, m_callbackarg); o_region.Region.GetLocalView().Put(1234, "Val-1", m_callbackarg); o_region.Region.GetLocalView().Invalidate(1234, m_callbackarg); Assert.AreEqual(o_region.Region.GetLocalView().Remove(12345, 12345, m_callbackarg), true, "Result of remove should be true, as this value exists locally."); Assert.AreEqual(o_region.Region.GetLocalView().ContainsKey(12345), false, "containsKey should be false"); Assert.AreEqual(o_region.Region.GetLocalView().Remove(12346, m_callbackarg), true, "Result of remove should be true, as this value exists locally."); Assert.AreEqual(o_region.Region.GetLocalView().ContainsKey(12346), false, "containsKey should be false"); o_region.Region.Invalidate("Key-1", m_callbackarg); o_region.Region.InvalidateRegion(m_callbackarg); }
public void doPutGetWithPdxSerializer() { CacheHelper.CSTXManager.Begin(); o_region1 = new RegionOperation(cstxRegions[0]); for (int i = 0; i < 10; i++) { o_region1.Region[i] = i + 1; object ret = o_region1.Region[i]; o_region1.Region[i + 10] = i + 10; ret = o_region1.Region[i + 10]; o_region1.Region[i + 20] = i + 20; ret = o_region1.Region[i + 20]; } CacheHelper.CSTXManager.Commit(); Util.Log("Region keys count after commit for non-pdx keys = {0} ", o_region1.Region.Keys.Count); Assert.AreEqual(30, o_region1.Region.Keys.Count, "Commit didn't put two values in the region"); CacheHelper.CSTXManager.Begin(); o_region1 = new RegionOperation(cstxRegions[0]); for (int i = 100; i < 110; i++) { object put = new SerializePdx1(true); o_region1.Region[i] = put; put = new SerializePdx2(true); o_region1.Region[i + 10] = put; put = new SerializePdx3(true, i % 2); o_region1.Region[i + 20] = put; } CacheHelper.CSTXManager.Commit(); for (int i = 100; i < 110; i++) { object put = new SerializePdx1(true); object ret = o_region1.Region[i]; Assert.AreEqual(put, ret); put = new SerializePdx2(true); ret = o_region1.Region[i + 10]; Assert.AreEqual(put, ret); put = new SerializePdx3(true, i % 2); ret = o_region1.Region[i + 20]; Assert.AreEqual(put, ret); } Util.Log("Region keys count after pdx-keys commit = {0} ", o_region1.Region.Keys.Count); Assert.AreEqual(60, o_region1.Region.Keys.Count, "Commit didn't put two values in the region"); }
public void TestGetAll() { o_region = new RegionOperation(RegionName); List <Object> keys = new List <Object>(); for (int item = 0; item < 10; item++) { Object K = item; keys.Add(K); } Dictionary <Object, Object> values = new Dictionary <Object, Object>(); o_region.Region.GetAll(keys.ToArray(), values, null, true, m_callbackarg); Dictionary <Object, Object> .Enumerator enumerator = values.GetEnumerator(); while (enumerator.MoveNext()) { Util.Log("Values after getAll with CallBack Key = {0} Value = {1} ", enumerator.Current.Key.ToString(), enumerator.Current.Value.ToString()); } }
public void ThreadStart() { RegionOperation o_region1 = new RegionOperation(cstxRegions[0]); RegionOperation o_region2 = new RegionOperation(cstxRegions[1]); CacheHelper.CSTXManager.Begin(); o_region1.PutOp(1, null); o_region2.PutOp(1, null); m_tid = CacheHelper.CSTXManager.TransactionId; m_txIdUpdated.Set(); if (m_sleep) { m_txevent.WaitOne(); Thread.Sleep(5000); } m_tid = CacheHelper.CSTXManager.Suspend(); }
/* * public void ValidateCSTXListenerWriter() * { * Util.Log("tallies for listener 1"); * m_listener1.ShowTallies(); * Util.Log("tallies for writer 1"); * m_writer1.ShowTallies(); * Util.Log("tallies for listener 2"); * m_listener2.ShowTallies(); * Util.Log("tallies for writer 2"); * m_writer2.ShowTallies(); * * // listener 1 * Assert.AreEqual(4, m_listener1.AfterCommitEvents, "Should be 4"); * Assert.AreEqual(14, m_listener1.AfterCommitKeyEvents, "Should be 14"); * Assert.AreEqual(0, m_listener1.AfterFailedCommitEvents, "Should be 0"); * Assert.AreEqual(0, m_listener1.AfterFailedCommitKeyEvents, "Should be 0"); * Assert.AreEqual(2, m_listener1.AfterRollbackEvents, "Should be 2"); * Assert.AreEqual(6, m_listener1.AfterRollbackKeyEvents, "Should be 6"); * Assert.AreEqual(1, m_listener1.CloseEvent, "Should be 1"); * Assert.AreEqual(false, m_listener1.IncorrectCacheName, "Incorrect cache name in the events"); * * // listener 2 * Assert.AreEqual(2, m_listener2.AfterCommitEvents, "Should be 2"); * Assert.AreEqual(6, m_listener2.AfterCommitKeyEvents, "Should be 6"); * Assert.AreEqual(0, m_listener2.AfterFailedCommitEvents, "Should be 0"); * Assert.AreEqual(0, m_listener2.AfterFailedCommitKeyEvents, "Should be 0"); * Assert.AreEqual(2, m_listener2.AfterRollbackEvents, "Should be 2"); * Assert.AreEqual(6, m_listener2.AfterRollbackKeyEvents, "Should be 6"); * Assert.AreEqual(1, m_listener2.CloseEvent, "Should be 1"); * Assert.AreEqual(false, m_listener2.IncorrectCacheName, "Incorrect cache name in the events"); * * // writer 1 * Assert.AreEqual(3, m_writer1.BeforeCommitEvents, "Should be 3"); * Assert.AreEqual(10, m_writer1.BeforeCommitKeyEvents, "Should be 10"); * Assert.AreEqual(false, m_writer1.IncorrectCacheName, "Incorrect cache name in the events"); * * // writer 2 * Assert.AreEqual(1, m_writer2.BeforeCommitEvents, "Should be 1"); * Assert.AreEqual(4, m_writer2.BeforeCommitKeyEvents, "Should be 4"); * Assert.AreEqual(false, m_writer2.IncorrectCacheName, "Incorrect cache name in the events"); * } */ #endregion public void ValidateListener() { o_region1 = new RegionOperation(cstxRegions[2]); CacheHelper.CSTXManager.Begin(); o_region1.Region.Put("key3", "value1", null); o_region1.Region.Put("key4", "value2", null); o_region1.Region.Remove("key4"); CacheHelper.CSTXManager.Commit(); // server is conflating the events on the same key hence only 1 create Assert.AreEqual(1, m_listener.Creates, "Should be 1 creates"); Assert.AreEqual(1, m_listener.Destroys, "Should be 1 destroys"); CacheHelper.CSTXManager.Begin(); o_region1.Region.Put("key1", "value1", null); o_region1.Region.Put("key2", "value2", null); o_region1.Region.Invalidate("key1"); o_region1.Region.Invalidate("key3"); CacheHelper.CSTXManager.Commit(); // server is conflating the events on the same key hence only 1 invalidate Assert.AreEqual(3, m_listener.Creates, "Should be 3 creates"); Assert.AreEqual(1, m_listener.Invalidates, "Should be 1 invalidates"); }
public void CallOp() { #region CSTX_COMMENTED - transaction listener and writer are disabled for now /* * m_writer1 = new CSTXWriter<object, object>(CacheHelper.DCache.Name, "cstxWriter1"); * m_writer2 = new CSTXWriter<object, object>(CacheHelper.DCache.Name, "cstxWriter2"); * m_listener1 = new CSTXListener<object, object>(CacheHelper.DCache.Name); * m_listener2 = new CSTXListener<object, object>(CacheHelper.DCache.Name); * * CacheHelper.CSTXManager.AddListener<object, object>(m_listener1); * CacheHelper.CSTXManager.AddListener<object, object>(m_listener2); * CacheHelper.CSTXManager.SetWriter<object, object>(m_writer1); * * // test two listener one writer for commit on two regions * Util.Log(" test two listener one writer for commit on two regions"); */ #endregion CacheHelper.CSTXManager.Begin(); o_region1 = new RegionOperation(cstxRegions[0]); o_region1.PutOp(2, null); o_region2 = new RegionOperation(cstxRegions[1]); o_region2.PutOp(2, null); CacheHelper.CSTXManager.Commit(); //two pdx put as well Assert.AreEqual(2 + 2, o_region1.Region.Keys.Count, "Commit didn't put two values in the region"); Assert.AreEqual(2 + 2, o_region2.Region.Keys.Count, "Commit didn't put two values in the region"); #region CSTX_COMMENTED - transaction listener and writer are disabled for now /* * Util.Log(" test two listener one writer for commit on two regions - complete"); * ////////////////////////////////// * * // region test two listener one writer for commit on one region * Util.Log(" region test two listener one writer for commit on one region"); * CacheHelper.CSTXManager.Begin(); * o_region1.PutOp(2, null); * * CacheHelper.CSTXManager.Commit(); * Util.Log(" region test two listener one writer for commit on one region - complete"); * ////////////////////////////////// * // test two listener one writer for rollback on two regions * Util.Log(" test two listener one writer for rollback on two regions"); */ #endregion CacheHelper.CSTXManager.Begin(); o_region1.PutOp(2, null); o_region2.PutOp(2, null); CacheHelper.CSTXManager.Rollback(); //two pdx put as well Assert.AreEqual(2 + 2, o_region1.Region.Keys.Count, "Region has incorrect number of objects"); Assert.AreEqual(2 + 2, o_region2.Region.Keys.Count, "Region has incorrect number of objects"); o_region1.DestroyOpWithPdxValue(2, null); o_region2.DestroyOpWithPdxValue(2, null); #region CSTX_COMMENTED - transaction listener and writer are disabled for now /* * * Util.Log(" test two listener one writer for rollback on two regions - complete"); * ////////////////////////////////// * * // test two listener one writer for rollback on on region * Util.Log(" test two listener one writer for rollback on on region"); * CacheHelper.CSTXManager.Begin(); * * o_region2.PutOp(2, null); * * CacheHelper.CSTXManager.Rollback(); * Util.Log(" test two listener one writer for rollback on on region - complete"); * ////////////////////////////////// * * // test remove listener * Util.Log(" test remove listener"); * CacheHelper.CSTXManager.RemoveListener<object, object>(m_listener2); * * CacheHelper.CSTXManager.Begin(); * o_region1.PutOp(2, null); * * o_region2.PutOp(2, null); * * CacheHelper.CSTXManager.Commit(); * Util.Log(" test remove listener - complete" ); * ////////////////////////////////// * * // test GetWriter * Util.Log("test GetWriter"); * CSTXWriter<object, object> writer = (CSTXWriter<object, object>)CacheHelper.CSTXManager.GetWriter<object, object>(); * Assert.AreEqual(writer.InstanceName, m_writer1.InstanceName, "GetWriter is not returning the object set by SetWriter"); * Util.Log("test GetWriter - complete"); * ////////////////////////////////// * * // set a different writer * Util.Log("set a different writer"); * CacheHelper.CSTXManager.SetWriter<object, object>(m_writer2); * * CacheHelper.CSTXManager.Begin(); * o_region1.PutOp(2, null); * * o_region2.PutOp(2, null); * * CacheHelper.CSTXManager.Commit(); * Util.Log("set a different writer - complete"); * ////////////////////////////////// */ #endregion }
public void TestlocalClear() { o_region = new RegionOperation(RegionName); o_region.Region.GetLocalView().Clear(m_callbackarg); }
public void TestRemove() { o_region = new RegionOperation(RegionName); o_region.Region.Remove("Key-1", "NewVal-1", m_callbackarg); o_region.Region.DestroyRegion(m_callbackarg); }
public void ThreadStart() { RegionOperation o_region1 = new RegionOperation(cstxRegions[0]); RegionOperation o_region2 = new RegionOperation(cstxRegions[1]); if (m_tryResumeWithSleep) { if (AssertCheckFail(CacheHelper.CSTXManager.IsSuspended(m_tid) == false, "Transaction should not be suspended")) { return; } } else { if (AssertCheckFail(CacheHelper.CSTXManager.IsSuspended(m_tid) == true, "Transaction should be suspended")) { return; } } if (AssertCheckFail(CacheHelper.CSTXManager.Exists(m_tid) == true, "Transaction should exist")) { return; } if (AssertCheckFail(0 == o_region1.Region.Keys.Count, "There should be 0 values in the region after suspend")) { return; } if (AssertCheckFail(0 == o_region2.Region.Keys.Count, "There should be 0 values in the region after suspend")) { return; } if (m_tryResumeWithSleep) { m_txevent.Set(); CacheHelper.CSTXManager.TryResume(m_tid, 30000); } else { CacheHelper.CSTXManager.Resume(m_tid); } if (AssertCheckFail(CacheHelper.CSTXManager.IsSuspended(m_tid) == false, "Transaction should not be suspended")) { return; } if (AssertCheckFail(CacheHelper.CSTXManager.Exists(m_tid) == true, "Transaction should exist")) { return; } if (AssertCheckFail(o_region1.Region.Keys.Count == 2, "There should be two values in the region after suspend")) { return; } if (AssertCheckFail(o_region2.Region.Keys.Count == 2, "There should be two values in the region after suspend")) { return; } o_region2.PutOp(2, null); if (m_isCommit) { CacheHelper.CSTXManager.Commit(); if (AssertCheckFail(CacheHelper.CSTXManager.IsSuspended(m_tid) == false, "Transaction should not be suspended")) { return; } if (AssertCheckFail(CacheHelper.CSTXManager.Exists(m_tid) == false, "Transaction should NOT exist")) { return; } if (AssertCheckFail(CacheHelper.CSTXManager.TryResume(m_tid) == false, "Transaction should not be resumed")) { return; } if (AssertCheckFail(CacheHelper.CSTXManager.TryResume(m_tid, 3000) == false, "Transaction should not be resumed")) { return; } if (AssertCheckFail(2 == o_region1.Region.Keys.Count, "There should be four values in the region after commit")) { return; } if (AssertCheckFail(4 == o_region2.Region.Keys.Count, "There should be four values in the region after commit")) { return; } o_region1.DestroyOpWithPdxValue(1, null); o_region2.DestroyOpWithPdxValue(2, null); } else { CacheHelper.CSTXManager.Rollback(); if (AssertCheckFail(CacheHelper.CSTXManager.IsSuspended(m_tid) == false, "Transaction should not be suspended")) { return; } if (AssertCheckFail(CacheHelper.CSTXManager.Exists(m_tid) == false, "Transaction should NOT exist")) { return; } if (AssertCheckFail(CacheHelper.CSTXManager.TryResume(m_tid) == false, "Transaction should not be resumed")) { return; } if (AssertCheckFail(CacheHelper.CSTXManager.TryResume(m_tid, 3000) == false, "Transaction should not be resumed")) { return; } if (AssertCheckFail(0 == o_region1.Region.Keys.Count, "There should be 0 values in the region after rollback")) { return; } if (AssertCheckFail(0 == o_region2.Region.Keys.Count, "There should be 0 values in the region after rollback")) { return; } } }