# IGNITE-368 Fixed test logic.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/87da8961 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/87da8961 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/87da8961 Branch: refs/heads/ignite-45 Commit: 87da8961cd973caf8923e46976270d6545a018e1 Parents: cb3eecf Author: AKuznetsov <akuznet...@gridgain.com> Authored: Tue Mar 17 14:40:05 2015 +0700 Committer: AKuznetsov <akuznet...@gridgain.com> Committed: Tue Mar 17 14:40:05 2015 +0700 ---------------------------------------------------------------------- .../internal/util/IgniteExceptionRegistrySelfTest.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/87da8961/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java ---------------------------------------------------------------------- diff --git a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java index 4d1e4f8..bebe1e4 100644 --- a/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java +++ b/modules/core/src/test/java/org/apache/ignite/internal/util/IgniteExceptionRegistrySelfTest.java @@ -44,15 +44,17 @@ public class IgniteExceptionRegistrySelfTest extends GridCommonAbstractTest { info(">>> Registry error count before test: " + errorCount); - Collection<IgniteExceptionRegistry.ExceptionInfo> errors = registry.getErrors(errorCount); - for (int i = 0; i < expCnt; i++) registry.onException("Test " + i, new Exception("Test " + i)); - info(">>> Registry error count after test: " + registry.errorCount()); + Collection<IgniteExceptionRegistry.ExceptionInfo> errors = registry.getErrors(errorCount); + + int sz = errors.size(); + + info(">>> Collected errors count after test: " + sz); - if (expCnt != errors.size()) { - info(">>> Expected error count: " + expCnt + ", but actual: " + errors.size()); + if (expCnt != sz) { + info(">>> Expected error count: " + expCnt + ", but actual: " + sz); for (IgniteExceptionRegistry.ExceptionInfo e : errors) if (!e.message().startsWith("Test ")) {