ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [50/50] [abbrv] incubator-ignite git commit: IGNITE-674 - Fixing tests.
Date Wed, 08 Apr 2015 02:04:05 GMT
IGNITE-674 - Fixing tests.


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

Branch: refs/heads/ignite-674
Commit: 151f970c90cc7ffebc483c19ed6a47c8d6571439
Parents: 65b5136
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Tue Apr 7 19:00:24 2015 -0700
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Tue Apr 7 19:00:24 2015 -0700

----------------------------------------------------------------------
 .../core/src/main/java/org/apache/ignite/IgniteCache.java   | 9 +++++++++
 .../ignite/internal/util/future/GridFutureAdapter.java      | 2 +-
 .../processors/cache/GridCacheBasicApiAbstractTest.java     | 4 ++--
 .../distributed/dht/IgniteCacheMultiTxLockSelfTest.java     | 5 -----
 4 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/151f970c/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index 5c5bb25..fb557c6 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -87,6 +87,15 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K,
V>, IgniteAsyncS
      */
     public Entry<K, V> randomEntry();
 
+    /**
+     * Returns cache with the specified expired policy set. This policy will be used for
each operation
+     * invoked on the returned cache.
+     * <p>
+     * This method does not modify existing cache instance.
+     *
+     * @param plc Expire policy to use.
+     * @return Cache instance with the specified expiry policy set.
+     */
     public IgniteCache<K, V> withExpiryPolicy(ExpiryPolicy plc);
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/151f970c/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
index 09cf63a..fb9ad29 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/future/GridFutureAdapter.java
@@ -430,7 +430,7 @@ public class GridFutureAdapter<R> extends AbstractQueuedSynchronizer
implements
 
         /** {@inheritDoc} */
         @Override public String toString() {
-            return S.toString(ArrayListener.class, this, "arr", Arrays.toString(arr));
+            return S.toString(ArrayListener.class, this, "arrSize", arr.length);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/151f970c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java
index 74b95e4..1dc5b7e 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheBasicApiAbstractTest.java
@@ -229,10 +229,10 @@ public abstract class GridCacheBasicApiAbstractTest extends GridCommonAbstractTe
                     try {
                         latch.countDown();
 
-                        cache.lockAll(Arrays.asList(keys.get(0), keys.get(1))).tryLock(50000,
MILLISECONDS);
+                        isOk.set(!cache.lockAll(Arrays.asList(keys.get(0), keys.get(1))).tryLock(5000,
MILLISECONDS));
                     }
                     catch (InterruptedException ignored) {
-                        isOk.set(true);
+                        isOk.set(false);
                     }
                 }
             });

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/151f970c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
index bb6ffdb..2d391c8 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/IgniteCacheMultiTxLockSelfTest.java
@@ -169,13 +169,9 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest
{
 
                     try {
                         // Explicit lock.
-                        U.debug(log, "Will lock key: " + vals.firstKey());
-
                         cache.lock(vals.firstKey(), 0);
 
                         try {
-                            U.debug(log, "Will run cache op: " + vals);
-
                             // Put or remove.
                             if (ThreadLocalRandom.current().nextDouble(1) < 0.65)
                                 cache.putAll(vals);
@@ -186,7 +182,6 @@ public class IgniteCacheMultiTxLockSelfTest extends GridCommonAbstractTest
{
                             U.error(log(), "Failed cache operation.", e);
                         }
                         finally {
-                            U.debug(log, "Will unlock key: " + vals.firstKey());
                             cache.unlock(vals.firstKey());
                         }
 


Mime
View raw message