You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/12/14 11:31:49 UTC
ignite git commit: ignite-1.5 Less unnecessary logging in test.
Repository: ignite
Updated Branches:
refs/heads/ignite-1.5 1224658fe -> 3d9be34c1
ignite-1.5 Less unnecessary logging in test.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/3d9be34c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/3d9be34c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/3d9be34c
Branch: refs/heads/ignite-1.5
Commit: 3d9be34c104cc2e89e2422e4f9c3f126449c8162
Parents: 1224658
Author: sboikov <sb...@gridgain.com>
Authored: Mon Dec 14 13:31:40 2015 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Mon Dec 14 13:31:40 2015 +0300
----------------------------------------------------------------------
.../GridCacheAbstractNodeRestartSelfTest.java | 25 +++++++++-----------
1 file changed, 11 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/3d9be34c/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
index dbd8758..2f4ff6f 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/GridCacheAbstractNodeRestartSelfTest.java
@@ -88,6 +88,9 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
private static final int DFLT_RETRIES = 10;
/** */
+ private static final int LOG_FREQ = 1000;
+
+ /** */
private static final Random RAND = new Random();
/** */
@@ -631,8 +634,6 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
Collection<Thread> threads = new LinkedList<>();
try {
- final int logFreq = 20;
-
final AtomicInteger putCntr = new AtomicInteger();
final CyclicBarrier barrier = new CyclicBarrier(putThreads + restartThreads);
@@ -665,7 +666,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
int c = putCntr.incrementAndGet();
- if (c % logFreq == 0)
+ if (c % LOG_FREQ == 0)
info(">>> Put iteration [cnt=" + c + ", key=" + key + ']');
}
}
@@ -705,7 +706,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
int c = ++cnt;
- if (c % logFreq == 0)
+ if (c % LOG_FREQ == 0)
info(">>> Restart iteration: " + c);
}
}
@@ -756,8 +757,6 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
Collection<Thread> threads = new LinkedList<>();
try {
- final int logFreq = 20;
-
final AtomicInteger txCntr = new AtomicInteger();
final CyclicBarrier barrier = new CyclicBarrier(putThreads + restartThreads);
@@ -799,7 +798,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
try (Transaction tx = txs.txStart(txConcurrency(), REPEATABLE_READ)) {
c = txCntr.incrementAndGet();
- if (c % logFreq == 0) {
+ if (c % LOG_FREQ == 0) {
info(">>> Tx iteration started [cnt=" + c +
", keys=" + keys +
", locNodeId=" + locNodeId + ']');
@@ -823,7 +822,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
// It is ok if primary node leaves grid.
}
- if (c % logFreq == 0) {
+ if (c % LOG_FREQ == 0) {
info(">>> Tx iteration finished [cnt=" + c +
", cacheSize=" + cache.localSize() +
", keys=" + keys +
@@ -864,7 +863,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
int c = ++cnt;
- if (c % logFreq == 0)
+ if (c % LOG_FREQ == 0)
info(">>> Restart iteration: " + c);
}
@@ -913,8 +912,6 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
Collection<Thread> threads = new LinkedList<>();
try {
- final int logFreq = 20;
-
final AtomicInteger txCntr = new AtomicInteger();
final CyclicBarrier barrier = new CyclicBarrier(putThreads + restartThreads);
@@ -955,7 +952,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
try (Transaction tx = ignite.transactions().txStart(PESSIMISTIC, REPEATABLE_READ)) {
c = txCntr.incrementAndGet();
- if (c % logFreq == 0)
+ if (c % LOG_FREQ == 0)
info(">>> Tx iteration started [cnt=" + c + ", keys=" + keys + ", " +
"locNodeId=" + locNodeId + ']');
@@ -972,7 +969,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
// It is ok if primary node leaves grid.
}
- if (c % logFreq == 0) {
+ if (c % LOG_FREQ == 0) {
info(">>> Tx iteration finished [cnt=" + c +
", keys=" + keys + ", " +
"locNodeId=" + locNodeId + ']');
@@ -1010,7 +1007,7 @@ public abstract class GridCacheAbstractNodeRestartSelfTest extends GridCommonAbs
int c = ++cnt;
- if (c % logFreq == 0)
+ if (c % LOG_FREQ == 0)
info(">>> Restart iteration: " + c);
}
}