ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: IGNITE-7722 Avoid creating strings for every compared byte in the test
Date Thu, 15 Feb 2018 16:07:18 GMT
Repository: ignite
Updated Branches:
  refs/heads/master c48c4ab21 -> d596be79c


IGNITE-7722 Avoid creating strings for every compared byte in the test


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

Branch: refs/heads/master
Commit: d596be79c70fa29f3309dc6e91765a749392a82c
Parents: c48c4ab
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Thu Feb 15 19:07:03 2018 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu Feb 15 19:07:03 2018 +0300

----------------------------------------------------------------------
 ...PdsCheckpointSimulationWithRealCpDisabledTest.java | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/d596be79/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
index 708d2b5..8f90b72 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/file/IgnitePdsCheckpointSimulationWithRealCpDisabledTest.java
@@ -704,11 +704,17 @@ public class IgnitePdsCheckpointSimulationWithRealCpDisabledTest extends
GridCom
 
                 try {
                     for (int i = PageIO.COMMON_HEADER_END; i < mem.pageSize(); i++) {
-                        assertEquals("Invalid state [pageId=" + fullId + ", pos=" + i + ']',
-                            state & 0xFF, PageUtils.getByte(pageAddr, i) & 0xFF);
+                        int expState = state & 0xFF;
+                        int pageState = PageUtils.getByte(pageAddr, i) & 0xFF;
+                        int walState = walData[i] & 0xFF;
 
-                        assertEquals("Invalid WAL state [pageId=" + fullId + ", pos=" + i
+ ']',
-                            state & 0xFF, walData[i] & 0xFF);
+                        if (expState != pageState)
+                            assertEquals("Invalid state [pageId=" + fullId + ", pos=" + i
+ ']',
+                                expState, pageState);
+
+                        if (expState != walState)
+                            assertEquals("Invalid WAL state [pageId=" + fullId + ", pos="
+ i + ']',
+                                expState, walState);
                     }
                 }
                 finally {


Mime
View raw message