ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [43/50] [abbrv] incubator-ignite git commit: # ignite-41
Date Mon, 22 Dec 2014 10:42:45 GMT
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f537940c/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
index 659f88e,77482d4..f7d630c
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractFullApiSelfTest.java
@@@ -4214,10 -4217,12 +4214,10 @@@ public abstract class GridCacheAbstract
              String key = "1";
              int ttl = 500;
  
-             try (GridCacheTx tx = grid(0).ignite().transactions().txStart()) {
 -            try (IgniteTx tx = c.txStart()) {
 -                GridCacheEntry<String, Integer> entry = c.entry(key);
 -
 -                entry.timeToLive(ttl);
++            try (IgniteTx tx = grid(0).ignite().transactions().txStart()) {
 +                final ExpiryPolicy expiry = new TouchedExpiryPolicy(new Duration(TimeUnit.MILLISECONDS,
ttl));
  
 -                entry.set(1);
 +                grid(0).jcache(null).withExpiryPolicy(expiry).put(key, 1);
  
                  tx.commit();
              }
@@@ -4280,14 -4283,15 +4280,10 @@@
  
          if (inTx) {
              // Rollback transaction for the first time.
-             GridCacheTx tx = grid(0).transactions().txStart();
 -            IgniteTx tx = c.txStart();
++            IgniteTx tx = grid(0).transactions().txStart();
  
              try {
 -                entry.timeToLive(ttl);
 -
 -                entry.set(1);
 -
 -                assertEquals(ttl, entry.timeToLive());
 -                assertTrue(entry.expirationTime() > 0);
 +                grid(0).jcache(null).withExpiryPolicy(expiry).put(key, 1);
- 
-                 // TODO IGNITE-41.
-                 //assertEquals(ttl, entry.timeToLive());
-                 //assertTrue(entry.expirationTime() > 0);
              }
              finally {
                  tx.rollback();
@@@ -4298,14 -4302,15 +4294,10 @@@
          }
  
          // Now commit transaction and check that ttl and expire time have been saved.
-         GridCacheTx tx = inTx ? c.txStart() : null;
+         IgniteTx tx = inTx ? c.txStart() : null;
  
          try {
 -            entry.timeToLive(ttl);
 -
 -            entry.set(1);
 -
 -            assertEquals(ttl, entry.timeToLive());
 -            assertTrue(entry.expirationTime() > 0);
 +            grid(0).jcache(null).withExpiryPolicy(expiry).put(key, 1);
- 
-             // TODO IGNITE-41.
-             //assertEquals(ttl, entry.timeToLive());
-             //assertTrue(entry.expirationTime() > 0);
          }
          finally {
              if (tx != null)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f537940c/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheInterceptorAbstractSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f537940c/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheRefreshAheadAbstractSelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f537940c/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f537940c/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
index 7887e1c,f272c87..929159f
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/GridCacheBasicOpAbstractTest.java
@@@ -319,7 -321,9 +320,7 @@@ public abstract class GridCacheBasicOpA
  
          cache1.put("key", "val");
  
-         GridCacheTx tx = ignite1.transactions().txStart();
 -        GridCacheEntry<String, String> entry = cache1.entry("key");
 -
 -        assert entry != null;
++        IgniteTx tx = ignite1.transactions().txStart();
  
          long ttl = 500;
  

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f537940c/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
index 3f1479b,2f72666..fd958db
--- a/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
+++ b/modules/core/src/test/java/org/gridgain/grid/kernal/processors/cache/distributed/near/GridCachePartitionedEvictionSelfTest.java
@@@ -9,9 -9,9 +9,10 @@@
  
  package org.gridgain.grid.kernal.processors.cache.distributed.near;
  
 +import org.apache.ignite.*;
  import org.apache.ignite.cluster.*;
  import org.apache.ignite.configuration.*;
+ import org.apache.ignite.transactions.*;
  import org.gridgain.grid.cache.*;
  import org.gridgain.grid.cache.affinity.*;
  import org.gridgain.grid.cache.eviction.fifo.*;
@@@ -22,12 -22,9 +23,12 @@@ import org.apache.ignite.spi.discovery.
  import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.*;
  import org.gridgain.grid.util.typedef.*;
  
 +import javax.cache.expiry.*;
 +import java.util.concurrent.*;
 +
  import static org.gridgain.grid.cache.GridCacheMode.*;
- import static org.gridgain.grid.cache.GridCacheTxIsolation.*;
- import static org.gridgain.grid.cache.GridCacheTxConcurrency.*;
+ import static org.apache.ignite.transactions.IgniteTxIsolation.*;
+ import static org.apache.ignite.transactions.IgniteTxConcurrency.*;
  import static org.gridgain.grid.cache.GridCacheWriteSynchronizationMode.*;
  
  /**
@@@ -167,16 -162,14 +168,16 @@@ public class GridCachePartitionedEvicti
          for (int kv = 0; kv < KEY_CNT; kv++) {
              String key = String.valueOf(kv);
  
 -            GridCacheProjection<String, Integer> c = cache(aff.mapKeyToNode(key));
 +            ClusterNode node = aff.mapKeyToNode(key);
  
 -            try (IgniteTx tx = c.txStart(concurrency, isolation)) {
 -                assert c.get(key) == null;
 +            IgniteCache<String, Integer> c = cache(node);
  
 -                c.put(key, kv);
 +            IgniteTransactions txs = G.ignite(node.id()).transactions();
 +
-             try (GridCacheTx tx = txs.txStart(concurrency, isolation)) {
++            try (IgniteTx tx = txs.txStart(concurrency, isolation)) {
 +                assert c.get(key) == null;
  
 -                c.entry(key).timeToLive(10);
 +                c.withExpiryPolicy(plc).put(key, 1);
  
                  assertEquals(Integer.valueOf(kv), c.get(key));
  

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f537940c/modules/core/src/test/java/org/gridgain/testsuites/GridCacheFullApiSelfTestSuite.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/gridgain/testsuites/GridCacheFullApiSelfTestSuite.java
index 8cd7753,d684215..1d0c54a
--- a/modules/core/src/test/java/org/gridgain/testsuites/GridCacheFullApiSelfTestSuite.java
+++ b/modules/core/src/test/java/org/gridgain/testsuites/GridCacheFullApiSelfTestSuite.java
@@@ -24,10 -24,10 +24,10 @@@ public class GridCacheFullApiSelfTestSu
       * @throws Exception If failed.
       */
      public static TestSuite suite() throws Exception {
 -        TestSuite suite = new TestSuite("Gridgain Cache Full API Test Suite");
 +        TestSuite suite = new TestSuite("Cache Full API Test Suite");
  
          // One node.
-         //suite.addTestSuite(GridCacheLocalFullApiSelfTest.class); GG-9141
+         suite.addTestSuite(GridCacheLocalFullApiSelfTest.class);
          suite.addTestSuite(GridCacheLocalAtomicFullApiSelfTest.class);
          suite.addTestSuite(GridCacheReplicatedFullApiSelfTest.class);
          suite.addTestSuite(GridCachePartitionedFullApiSelfTest.class);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f537940c/modules/core/src/test/java/org/gridgain/testsuites/bamboo/GridDataGridTestSuite.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f537940c/modules/indexing/src/test/java/org/gridgain/grid/kernal/processors/cache/GridCacheAbstractQuerySelfTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/f537940c/modules/web/src/main/java/org/gridgain/grid/cache/websession/GridWebSessionFilter.java
----------------------------------------------------------------------
diff --cc modules/web/src/main/java/org/gridgain/grid/cache/websession/GridWebSessionFilter.java
index f5c545e,8697366..9556c83
--- a/modules/web/src/main/java/org/gridgain/grid/cache/websession/GridWebSessionFilter.java
+++ b/modules/web/src/main/java/org/gridgain/grid/cache/websession/GridWebSessionFilter.java
@@@ -11,8 -11,8 +11,9 @@@ package org.gridgain.grid.cache.websess
  
  import org.apache.ignite.*;
  import org.apache.ignite.lang.*;
+ import org.apache.ignite.transactions.*;
  import org.gridgain.grid.cache.*;
 +import org.gridgain.grid.kernal.processors.cache.*;
  import org.gridgain.grid.startup.servlet.*;
  import org.gridgain.grid.util.typedef.*;
  import org.gridgain.grid.util.typedef.internal.*;
@@@ -23,11 -22,10 +24,11 @@@ import javax.servlet.http.*
  import java.io.*;
  import java.util.*;
  
 +import static java.util.concurrent.TimeUnit.*;
  import static org.gridgain.grid.cache.GridCacheAtomicityMode.*;
  import static org.gridgain.grid.cache.GridCacheMode.*;
- import static org.gridgain.grid.cache.GridCacheTxConcurrency.*;
- import static org.gridgain.grid.cache.GridCacheTxIsolation.*;
+ import static org.apache.ignite.transactions.IgniteTxConcurrency.*;
+ import static org.apache.ignite.transactions.IgniteTxIsolation.*;
  import static org.gridgain.grid.cache.GridCacheWriteSynchronizationMode.*;
  
  /**


Mime
View raw message