geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasonhu...@apache.org
Subject geode git commit: Modified Test
Date Wed, 12 Apr 2017 21:43:31 GMT
Repository: geode
Updated Branches:
  refs/heads/feature/GEODE-2703 e7b57b679 -> 9a93b7acd


Modified Test


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

Branch: refs/heads/feature/GEODE-2703
Commit: 9a93b7acd31d07eeb97af93dc12c817e64f210c2
Parents: e7b57b6
Author: Jason Huynh <huynhja@gmail.com>
Authored: Wed Apr 12 14:42:52 2017 -0700
Committer: Jason Huynh <huynhja@gmail.com>
Committed: Wed Apr 12 14:42:52 2017 -0700

----------------------------------------------------------------------
 .../org/apache/geode/cache/lucene/LuceneQueriesDUnitTest.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/9a93b7ac/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesDUnitTest.java
b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesDUnitTest.java
index 1f78353..41403f7 100644
--- a/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesDUnitTest.java
+++ b/geode-lucene/src/test/java/org/apache/geode/cache/lucene/LuceneQueriesDUnitTest.java
@@ -64,9 +64,9 @@ public class LuceneQueriesDUnitTest extends LuceneQueriesAccessorBase {
     assertTrue(waitForFlushBeforeExecuteTextSearch(dataStore1, 60000));
 
     accessor.invoke(() -> {
+      Cache cache = getCache();
+      cache.getCacheTransactionManager().begin();
       try {
-        Cache cache = getCache();
-        cache.getCacheTransactionManager().begin();
         Region<Object, Object> region = cache.getRegion(REGION_NAME);
 
         LuceneService service = LuceneServiceProvider.get(cache);
@@ -83,13 +83,13 @@ public class LuceneQueriesDUnitTest extends LuceneQueriesAccessorBase
{
         }
 
         assertEquals(new HashMap(region), data);
-        cache.getCacheTransactionManager().commit();
         fail();
       } catch (LuceneQueryException e) {
         if (!e.getMessage()
             .equals(LuceneQueryImpl.LUCENE_QUERY_CANNOT_BE_EXECUTED_WITHIN_A_TRANSACTION))
{
           fail();
         }
+        cache.getCacheTransactionManager().rollback();
       }
     });
 


Mime
View raw message