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 2017/11/13 09:52:05 UTC

[11/28] ignite git commit: IGNITE-6839 Delete binary meta before tests, PDS compatibility tests improved - Fixes #2990.

IGNITE-6839 Delete binary meta before tests, PDS compatibility tests improved - Fixes #2990.

Signed-off-by: Alexey Goncharuk <al...@gmail.com>


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

Branch: refs/heads/ignite-zk
Commit: 20ec6c948964efda204417a47d8fce6f128c222b
Parents: a82ff06
Author: dpavlov <dp...@gridgain.com>
Authored: Fri Nov 10 11:01:05 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Fri Nov 10 11:01:05 2017 +0300

----------------------------------------------------------------------
 .../DummyPersistenceCompatibilityTest.java      | 225 ++++++++++++++++++-
 .../FoldersReuseCompatibilityTest.java          |  48 +++-
 .../wal/reader/StandaloneGridKernalContext.java |   2 +-
 .../db/wal/reader/IgniteWalReaderTest.java      | 106 ++++-----
 4 files changed, 316 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/20ec6c94/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/DummyPersistenceCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/DummyPersistenceCompatibilityTest.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/DummyPersistenceCompatibilityTest.java
index 655da52..b05d5a6 100644
--- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/DummyPersistenceCompatibilityTest.java
+++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/DummyPersistenceCompatibilityTest.java
@@ -17,6 +17,11 @@
 
 package org.apache.ignite.compatibility.persistence;
 
+import java.io.Externalizable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.io.Serializable;
 import org.apache.ignite.Ignite;
 import org.apache.ignite.IgniteCache;
 import org.apache.ignite.cache.CacheAtomicityMode;
@@ -28,15 +33,25 @@ import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.PersistentStoreConfiguration;
 import org.apache.ignite.internal.IgniteEx;
 import org.apache.ignite.internal.processors.cache.GridCacheAbstractFullApiSelfTest;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteInClosure;
 import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
 
-/** */
+/**
+ * Saves data using previous version of ignite and then load this data using actual version
+ */
 public class DummyPersistenceCompatibilityTest extends IgnitePersistenceCompatibilityAbstractTest {
     /** */
     private static final String TEST_CACHE_NAME = DummyPersistenceCompatibilityTest.class.getSimpleName();
 
     /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        super.beforeTest();
+
+        deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), "binary_meta", false));
+    }
+
+    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
@@ -52,11 +67,41 @@ public class DummyPersistenceCompatibilityTest extends IgnitePersistenceCompatib
     }
 
     /**
+     * Tests opportunity to read data from previous Ignite DB version.
+     *
+     * @throws Exception If failed.
+     */
+    public void testNodeStartByOldVersionPersistenceData_2_2() throws Exception {
+        doTestStartupWithOldVersion("2.2.0");
+    }
+
+    /**
+     * Tests opportunity to read data from previous Ignite DB version.
+     *
+     * @throws Exception If failed.
+     */
+    public void testNodeStartByOldVersionPersistenceData_2_1() throws Exception {
+        doTestStartupWithOldVersion("2.1.0");
+    }
+
+    /**
+     * Tests opportunity to read data from previous Ignite DB version.
+     *
+     * @throws Exception If failed.
+     */
+    public void testNodeStartByOldVersionPersistenceData_2_3() throws Exception {
+        doTestStartupWithOldVersion("2.3.0");
+    }
+
+    /**
+     * Tests opportunity to read data from previous Ignite DB version.
+     *
+     * @param ver 3-digits version of ignite
      * @throws Exception If failed.
      */
-    public void testNodeStartByOldVersionPersistenceData() throws Exception {
+    private void doTestStartupWithOldVersion(String ver) throws Exception {
         try {
-            startGrid(1, "2.2.0", new ConfigurationClosure(), new PostStartupClosure());
+            startGrid(1, ver, new ConfigurationClosure(), new PostStartupClosure());
 
             stopAllGrids();
 
@@ -66,10 +111,23 @@ public class DummyPersistenceCompatibilityTest extends IgnitePersistenceCompatib
 
             ignite.active(true);
 
-            IgniteCache<Integer, String> cache = ignite.getOrCreateCache(TEST_CACHE_NAME);
+            IgniteCache<Object, Object> cache = ignite.getOrCreateCache(TEST_CACHE_NAME);
 
             for (int i = 0; i < 10; i++)
                 assertEquals("data" + i, cache.get(i));
+
+            assertEquals(cache.get("1"), "2");
+            assertEquals(cache.get(12), 2);
+            assertEquals(cache.get(13L), 2L);
+            assertEquals(cache.get(TestEnum.A), "Enum_As_Key");
+            assertEquals(cache.get("Enum_As_Value"), TestEnum.B);
+            assertEquals(cache.get(TestEnum.C), TestEnum.C);
+            assertEquals(cache.get("Serializable"), new TestSerializable(42));
+            assertEquals(cache.get(new TestSerializable(42)), "Serializable_As_Key");
+            assertEquals(cache.get("Externalizable"), new TestExternalizable(42));
+            assertEquals(cache.get(new TestExternalizable(42)), "Externalizable_As_Key");
+            assertEquals(cache.get("testStringContainer"),
+                new TestStringContainerToBePrinted("testStringContainer"));
         }
         finally {
             stopAllGrids();
@@ -82,16 +140,28 @@ public class DummyPersistenceCompatibilityTest extends IgnitePersistenceCompatib
         @Override public void apply(Ignite ignite) {
             ignite.active(true);
 
-            CacheConfiguration<Integer, String> cacheCfg = new CacheConfiguration<>();
+            CacheConfiguration<Object, Object> cacheCfg = new CacheConfiguration<>();
             cacheCfg.setName(TEST_CACHE_NAME);
             cacheCfg.setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL);
             cacheCfg.setBackups(1);
             cacheCfg.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
 
-            IgniteCache<Integer, String> cache = ignite.createCache(cacheCfg);
+            IgniteCache<Object, Object> cache = ignite.createCache(cacheCfg);
 
             for (int i = 0; i < 10; i++)
                 cache.put(i, "data" + i);
+
+            cache.put("1", "2");
+            cache.put(12, 2);
+            cache.put(13L, 2L);
+            cache.put(TestEnum.A, "Enum_As_Key");
+            cache.put("Enum_As_Value", TestEnum.B);
+            cache.put(TestEnum.C, TestEnum.C);
+            cache.put("Serializable", new TestSerializable(42));
+            cache.put(new TestSerializable(42), "Serializable_As_Key");
+            cache.put("Externalizable", new TestExternalizable(42));
+            cache.put(new TestExternalizable(42), "Externalizable_As_Key");
+            cache.put("testStringContainer", new TestStringContainerToBePrinted("testStringContainer"));
         }
     }
 
@@ -111,4 +181,147 @@ public class DummyPersistenceCompatibilityTest extends IgnitePersistenceCompatib
             cfg.setPersistentStoreConfiguration(new PersistentStoreConfiguration());
         }
     }
+
+    /** Enum for cover binaryObject enum save/load. */
+    public enum TestEnum {
+        /** */A, /** */B, /** */C
+    }
+
+    /** Special class to test WAL reader resistance to Serializable interface. */
+    static class TestSerializable implements Serializable {
+        /** */
+        private static final long serialVersionUID = 0L;
+
+        /** I value. */
+        private int iVal;
+
+        /**
+         * Creates test object
+         *
+         * @param iVal I value.
+         */
+        TestSerializable(int iVal) {
+            this.iVal = iVal;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return "TestSerializable{" +
+                "iVal=" + iVal +
+                '}';
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            if (this == o)
+                return true;
+            if (o == null || getClass() != o.getClass())
+                return false;
+
+            TestSerializable that = (TestSerializable)o;
+
+            return iVal == that.iVal;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return iVal;
+        }
+    }
+
+    /** Special class to test WAL reader resistance to Serializable interface. */
+    static class TestExternalizable implements Externalizable {
+        /** */
+        private static final long serialVersionUID = 0L;
+
+        /** I value. */
+        private int iVal;
+
+        /** Noop ctor for unmarshalling */
+        public TestExternalizable() {
+
+        }
+
+        /**
+         * Creates test object with provided value.
+         *
+         * @param iVal I value.
+         */
+        public TestExternalizable(int iVal) {
+            this.iVal = iVal;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return "TestExternalizable{" +
+                "iVal=" + iVal +
+                '}';
+        }
+
+        /** {@inheritDoc} */
+        @Override public void writeExternal(ObjectOutput out) throws IOException {
+            out.writeInt(iVal);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
+            iVal = in.readInt();
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            if (this == o)
+                return true;
+            if (o == null || getClass() != o.getClass())
+                return false;
+
+            TestExternalizable that = ( TestExternalizable)o;
+
+            return iVal == that.iVal;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return iVal;
+        }
+    }
+
+    /** Container class to test toString of data records. */
+    static class TestStringContainerToBePrinted {
+        /** */
+        String data;
+
+        /**
+         * Creates container.
+         *
+         * @param data value to be searched in to String.
+         */
+        public TestStringContainerToBePrinted(String data) {
+            this.data = data;
+        }
+
+        /** {@inheritDoc} */
+        @Override public boolean equals(Object o) {
+            if (this == o)
+                return true;
+            if (o == null || getClass() != o.getClass())
+                return false;
+
+            TestStringContainerToBePrinted printed = (TestStringContainerToBePrinted)o;
+
+            return data != null ? data.equals(printed.data) : printed.data == null;
+        }
+
+        /** {@inheritDoc} */
+        @Override public int hashCode() {
+            return data != null ? data.hashCode() : 0;
+        }
+
+        /** {@inheritDoc} */
+        @Override public String toString() {
+            return "TestStringContainerToBePrinted{" +
+                "data='" + data + '\'' +
+                '}';
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/20ec6c94/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java
index 1775013..06b96fc 100644
--- a/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java
+++ b/modules/compatibility/src/test/java/org/apache/ignite/compatibility/persistence/FoldersReuseCompatibilityTest.java
@@ -23,6 +23,7 @@ import java.util.Arrays;
 import java.util.Set;
 import java.util.TreeSet;
 import org.apache.ignite.Ignite;
+import org.apache.ignite.IgniteCache;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.configuration.IgniteConfiguration;
 import org.apache.ignite.configuration.MemoryConfiguration;
@@ -46,10 +47,13 @@ public class FoldersReuseCompatibilityTest extends IgnitePersistenceCompatibilit
     private static final String CACHE_NAME = "dummy";
 
     /** Key to store in previous version of ignite */
-    private static final String KEY = "ObjectFromPast";
+    private static final String KEY = "StringFromPrevVersion";
 
     /** Value to store in previous version of ignite */
-    private static final String VAL = "ValueFromPast";
+    private static final String VAL = "ValueFromPrevVersion";
+
+    /** Key to store in previous version of ignite */
+    private static final String KEY_OBJ = "ObjectFromPrevVersion";
 
     /** {@inheritDoc} */
     @Override protected void afterTest() throws Exception {
@@ -58,6 +62,13 @@ public class FoldersReuseCompatibilityTest extends IgnitePersistenceCompatibilit
     }
 
     /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        super.beforeTest();
+
+        deleteRecursively(U.resolveWorkDirectory(U.defaultWorkDirectory(), "binary_meta", false));
+    }
+
+    /** {@inheritDoc} */
     @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
         final IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
 
@@ -72,6 +83,16 @@ public class FoldersReuseCompatibilityTest extends IgnitePersistenceCompatibilit
      *
      * @throws Exception if failed.
      */
+    public void ignored_testFoldersReuseCompatibility_2_3() throws Exception {
+        runFoldersReuse("2.3.0");
+    }
+
+    /**
+     * Test startup of current ignite version using DB storage folder from previous version of Ignite. Expected to start
+     * successfully with existing DB
+     *
+     * @throws Exception if failed.
+     */
     public void testFoldersReuseCompatibility_2_2() throws Exception {
         runFoldersReuse("2.2.0");
     }
@@ -94,9 +115,8 @@ public class FoldersReuseCompatibilityTest extends IgnitePersistenceCompatibilit
      * @throws Exception if failed.
      */
     private void runFoldersReuse(String ver) throws Exception {
-        final IgniteEx grid = startGrid(1, ver, new ConfigurationClosure(), new PostStartupClosure());
+        final IgniteEx oldVer = startGrid(1, ver, new ConfigurationClosure(), new PostStartupClosure());
 
-        grid.close();
         stopAllGrids();
 
         IgniteEx ignite = startGrid(0);
@@ -109,6 +129,9 @@ public class FoldersReuseCompatibilityTest extends IgnitePersistenceCompatibilit
 
         assertEquals(VAL, ignite.cache(CACHE_NAME).get(KEY));
 
+        final DummyPersistenceCompatibilityTest.TestStringContainerToBePrinted actual = (DummyPersistenceCompatibilityTest.TestStringContainerToBePrinted)ignite.cache(CACHE_NAME).get(KEY_OBJ);
+        assertEquals(VAL, actual.data);
+
         assertNodeIndexesInFolder();// should not create any new style directories
 
         stopAllGrids();
@@ -119,7 +142,22 @@ public class FoldersReuseCompatibilityTest extends IgnitePersistenceCompatibilit
         /** {@inheritDoc} */
         @Override public void apply(Ignite ignite) {
             ignite.active(true);
-            ignite.getOrCreateCache(CACHE_NAME).put(KEY, VAL);
+
+            final IgniteCache<Object, Object> cache = ignite.getOrCreateCache(CACHE_NAME);
+            cache.put(KEY, VAL);
+            cache.put("1", "2");
+            cache.put(1, 2);
+            cache.put(1L, 2L);
+            cache.put(DummyPersistenceCompatibilityTest.TestEnum.A, "Enum_As_Key");
+            cache.put("Enum_As_Value", DummyPersistenceCompatibilityTest.TestEnum.B);
+            cache.put(DummyPersistenceCompatibilityTest.TestEnum.C, DummyPersistenceCompatibilityTest.TestEnum.C);
+
+            cache.put("Serializable", new DummyPersistenceCompatibilityTest.TestSerializable(42));
+            cache.put(new DummyPersistenceCompatibilityTest.TestSerializable(42), "Serializable_As_Key");
+            cache.put("Externalizable", new DummyPersistenceCompatibilityTest.TestExternalizable(42));
+            cache.put(new DummyPersistenceCompatibilityTest.TestExternalizable(42), "Externalizable_As_Key");
+            cache.put(KEY_OBJ, new DummyPersistenceCompatibilityTest.TestStringContainerToBePrinted(VAL));
+
         }
     }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/20ec6c94/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneGridKernalContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneGridKernalContext.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneGridKernalContext.java
index 485458b..80dfc5b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneGridKernalContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/wal/reader/StandaloneGridKernalContext.java
@@ -94,7 +94,7 @@ import org.jetbrains.annotations.Nullable;
  * Dummy grid kernal context
  */
 public class StandaloneGridKernalContext implements GridKernalContext {
-    /** Binary metadata file store folderŅŽ */
+    /** Binary metadata file store folder. */
     public static final String BINARY_META_FOLDER = "binary_meta";
 
     /** Config for fake Ignite instance. */

http://git-wip-us.apache.org/repos/asf/ignite/blob/20ec6c94/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java
index 9348a68..1844bfe 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/wal/reader/IgniteWalReaderTest.java
@@ -98,17 +98,17 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     /** Cache name. */
     private static final String CACHE_NAME = "cache0";
 
-    /** additional cache for testing different combinations of types in WAL */
+    /** additional cache for testing different combinations of types in WAL. */
     private static final String CACHE_ADDL_NAME = "cache1";
 
-    /** Dump records to logger. Should be false for non local run */
+    /** Dump records to logger. Should be false for non local run. */
     private static final boolean dumpRecords = false;
 
-    /** Page size to set */
+    /** Page size to set. */
     public static final int PAGE_SIZE = 4 * 1024;
 
     /**
-     * Field for transferring setting from test to getConfig method
+     * Field for transferring setting from test to getConfig method.
      * Archive incomplete segment after inactivity milliseconds.
      */
     private int archiveIncompleteSegmentAfterInactivityMs;
@@ -116,7 +116,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     /** Custom wal mode. */
     private WALMode customWalMode;
 
-    /** Clear properties in afterTest method() */
+    /** Clear properties in afterTest() method. */
     private boolean clearProperties;
 
     /** {@inheritDoc} */
@@ -237,23 +237,23 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Iterates on records and closes iterator
+     * Iterates on records and closes iterator.
      *
-     * @param walIter iterator to count, will be closed
-     * @return count of records
-     * @throws IgniteCheckedException if failed to iterate
+     * @param walIter iterator to count, will be closed.
+     * @return count of records.
+     * @throws IgniteCheckedException if failed to iterate.
      */
     private int iterateAndCount(WALIterator walIter) throws IgniteCheckedException {
         return iterateAndCount(walIter, true);
     }
 
     /**
-     * Iterates on records and closes iterator
+     * Iterates on records and closes iterator.
      *
-     * @param walIter iterator to count, will be closed
-     * @param touchEntries access data within entries
-     * @return count of records
-     * @throws IgniteCheckedException if failed to iterate
+     * @param walIter iterator to count, will be closed.
+     * @param touchEntries access data within entries.
+     * @return count of records.
+     * @throws IgniteCheckedException if failed to iterate.
      */
     private int iterateAndCount(WALIterator walIter, boolean touchEntries) throws IgniteCheckedException {
         int cnt = 0;
@@ -280,9 +280,9 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Tests archive completed event is fired
+     * Tests archive completed event is fired.
      *
-     * @throws Exception if failed
+     * @throws Exception if failed.
      */
     public void testArchiveCompletedEventFired() throws Exception {
         final AtomicBoolean evtRecorded = new AtomicBoolean();
@@ -315,10 +315,10 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Puts provided number of records to fill WAL
+     * Puts provided number of records to fill WAL.
      *
-     * @param ignite ignite instance
-     * @param recordsToWrite count
+     * @param ignite ignite instance.
+     * @param recordsToWrite count.
      */
     private void putDummyRecords(Ignite ignite, int recordsToWrite) {
         IgniteCache<Object, Object> cache0 = ignite.cache(CACHE_NAME);
@@ -328,10 +328,10 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Puts provided number of records to fill WAL
+     * Puts provided number of records to fill WAL.
      *
-     * @param ignite ignite instance
-     * @param recordsToWrite count
+     * @param ignite ignite instance.
+     * @param recordsToWrite count.
      */
     private void putAllDummyRecords(Ignite ignite, int recordsToWrite) {
         IgniteCache<Object, Object> cache0 = ignite.cache(CACHE_NAME);
@@ -345,11 +345,11 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Puts provided number of records to fill WAL under transactions
+     * Puts provided number of records to fill WAL under transactions.
      *
-     * @param ignite ignite instance
-     * @param recordsToWrite count
-     * @param txCnt transactions to run. If number is less then records count, txCnt records will be written
+     * @param ignite ignite instance.
+     * @param recordsToWrite count.
+     * @param txCnt transactions to run. If number is less then records count, txCnt records will be written.
      */
     private IgniteCache<Object, Object> txPutDummyRecords(Ignite ignite, int recordsToWrite, int txCnt) {
         IgniteCache<Object, Object> cache0 = ignite.cache(CACHE_NAME);
@@ -368,9 +368,9 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Tests time out based WAL segment archiving
+     * Tests time out based WAL segment archiving.
      *
-     * @throws Exception if failure occurs
+     * @throws Exception if failure occurs.
      */
     public void testArchiveIncompleteSegmentAfterInactivity() throws Exception {
         final AtomicBoolean waitingForEvt = new AtomicBoolean();
@@ -410,12 +410,12 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Removes entry by key and value from map (java 8 map method copy)
+     * Removes entry by key and value from map (java 8 map method copy).
      *
      * @param m map to remove from.
      * @param key key to remove.
      * @param val value to remove.
-     * @return true if remove was successful
+     * @return true if remove was successful.
      */
     private boolean remove(Map m, Object key, Object val) {
         Object curVal = m.get(key);
@@ -427,7 +427,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Places records under transaction, checks its value using WAL
+     * Places records under transaction, checks its value using WAL.
      *
      * @throws Exception if failed.
      */
@@ -481,11 +481,11 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Generates DB subfolder name for provided node index (local) and UUID (consistent ID)
+     * Generates DB subfolder name for provided node index (local) and UUID (consistent ID).
      *
      * @param ignite ignite instance.
      * @param nodeIdx node index.
-     * @return folder file name
+     * @return folder file name.
      */
     @NotNull private String genDbSubfolderName(Ignite ignite, int nodeIdx) {
         return genNewStyleSubfolderName(nodeIdx, (UUID)ignite.cluster().localNode().consistentId());
@@ -500,7 +500,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
      * @param minCntEntries minimum expected entries count to find.
      * @param minTxCnt minimum expected transaction count to find.
      * @param objConsumer object handler, called for each object found in logical data records.
-     * @param dataRecordHnd data handler record
+     * @param dataRecordHnd data handler record.
      * @throws IgniteCheckedException if failed.
      */
     private void scanIterateAndCount(
@@ -600,9 +600,9 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
             ctrlMap.put(next.getKey(), next.getValue());
         }
 
-            for (Cache.Entry<Object, Object> next : addlCache) {
-                ctrlMapForBinaryObjects.put(next.getKey(), next.getValue());
-            }
+        for (Cache.Entry<Object, Object> next : addlCache) {
+            ctrlMapForBinaryObjects.put(next.getKey(), next.getValue());
+        }
 
         final String subfolderName = genDbSubfolderName(ignite0, 0);
 
@@ -724,9 +724,9 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Tests archive completed event is fired
+     * Tests archive completed event is fired.
      *
-     * @throws Exception if failed
+     * @throws Exception if failed.
      */
     public void testFillWalForExactSegmentsCount() throws Exception {
         customWalMode = WALMode.DEFAULT;
@@ -773,7 +773,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Tests reading of empty WAL from non filled cluster
+     * Tests reading of empty WAL from non filled cluster.
      *
      * @throws Exception if failed.
      */
@@ -1033,8 +1033,8 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * @param values collection with numbers
-     * @return sum of numbers
+     * @param values collection with numbers.
+     * @return sum of numbers.
      */
     private int valuesSum(Iterable<Integer> values) {
         int sum = 0;
@@ -1046,11 +1046,11 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
     }
 
     /**
-     * Iterates over data records, checks each DataRecord and its entries, finds out all transactions in WAL
+     * Iterates over data records, checks each DataRecord and its entries, finds out all transactions in WAL.
      *
-     * @param walIter iterator to use
-     * @return count of data records observed for each global TX ID. Contains null for non tx updates
-     * @throws IgniteCheckedException if failure
+     * @param walIter iterator to use.
+     * @return count of data records observed for each global TX ID. Contains null for non tx updates.
+     * @throws IgniteCheckedException if failure.
      */
     private Map<GridCacheVersion, Integer> iterateAndCountDataRecord(
         final WALIterator walIter,
@@ -1119,12 +1119,12 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
         return entriesUnderTxFound;
     }
 
-    /** Enum for cover binaryObject enum save/load */
+    /** Enum for cover binaryObject enum save/load. */
     enum TestEnum {
         /** */A, /** */B, /** */C
     }
 
-    /** Special class to test WAL reader resistance to Serializable interface */
+    /** Special class to test WAL reader resistance to Serializable interface. */
     static class TestSerializable implements Serializable {
         /** */
         private static final long serialVersionUID = 0L;
@@ -1133,7 +1133,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
         private int iVal;
 
         /**
-         * Creates test object
+         * Creates test object.
          *
          * @param iVal I value.
          */
@@ -1166,7 +1166,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
         }
     }
 
-    /** Special class to test WAL reader resistance to Serializable interface */
+    /** Special class to test WAL reader resistance to Serializable interface. */
     static class TestExternalizable implements Externalizable {
         /** */
         private static final long serialVersionUID = 0L;
@@ -1180,7 +1180,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
         }
 
         /**
-         * Creates test object with provided value
+         * Creates test object with provided value.
          *
          * @param iVal I value.
          */
@@ -1223,7 +1223,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
         }
     }
 
-    /** Container class to test toString of data records */
+    /** Container class to test toString of data records. */
     static class TestStringContainerToBePrinted {
         /** */
         private String data;
@@ -1262,7 +1262,7 @@ public class IgniteWalReaderTest extends GridCommonAbstractTest {
         }
     }
 
-    /** Test class for storing in ignite */
+    /** Test class for storing in ignite. */
     private static class Organization {
         /** Key. */
         private final int key;