ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [35/50] incubator-ignite git commit: Improve IgniteCacheExpiryPolicyAbstractTest.
Date Mon, 02 Mar 2015 18:45:41 GMT
Improve IgniteCacheExpiryPolicyAbstractTest.


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

Branch: refs/heads/ignite-141
Commit: 0086e9cd2ab652d58adc4edf016932388de9686a
Parents: c847e88
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Mon Mar 2 14:23:19 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Mon Mar 2 14:25:02 2015 +0300

----------------------------------------------------------------------
 .../IgniteCacheExpiryPolicyAbstractTest.java    | 38 ++------------------
 1 file changed, 3 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0086e9cd/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
index 3110cbc..e04659c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/expiry/IgniteCacheExpiryPolicyAbstractTest.java
@@ -103,23 +103,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
      * @throws Exception If failed.
      */
     public void testZeroOnUpdate() throws Exception {
-        factory = new Factory<ExpiryPolicy>() {
-            @Override public ExpiryPolicy create() {
-                return new ExpiryPolicy() {
-                    @Override public Duration getExpiryForCreation() {
-                        return null;
-                    }
-
-                    @Override public Duration getExpiryForAccess() {
-                        return null;
-                    }
-
-                    @Override public Duration getExpiryForUpdate() {
-                        return Duration.ZERO;
-                    }
-                };
-            }
-        };
+        factory = new FactoryBuilder.SingletonFactory<>(new TestPolicy(null, 0L, null));
 
         startGrids();
 
@@ -150,23 +134,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
      * @throws Exception If failed.
      */
     public void testZeroOnAccess() throws Exception {
-        factory = new Factory<ExpiryPolicy>() {
-            @Override public ExpiryPolicy create() {
-                return new ExpiryPolicy() {
-                    @Override public Duration getExpiryForCreation() {
-                        return null;
-                    }
-
-                    @Override public Duration getExpiryForAccess() {
-                        return Duration.ZERO;
-                    }
-
-                    @Override public Duration getExpiryForUpdate() {
-                        return null;
-                    }
-                };
-            }
-        };
+        factory = new FactoryBuilder.SingletonFactory<>(new TestPolicy(null, null,
0L));
 
         startGrids();
 
@@ -1087,7 +1055,7 @@ public abstract class IgniteCacheExpiryPolicyAbstractTest extends IgniteCacheAbs
     /**
      *
      */
-    private class TestPolicy implements ExpiryPolicy {
+    private static class TestPolicy implements ExpiryPolicy {
         /** */
         private Long create;
 


Mime
View raw message