Uncomment @Test in ShardManagerTest 88/67088/2
authorTom Pantelis <tompantelis@gmail.com>
Fri, 12 Jan 2018 03:18:11 +0000 (22:18 -0500)
committerTom Pantelis <tompantelis@gmail.com>
Tue, 16 Jan 2018 02:32:09 +0000 (02:32 +0000)
I wanted to run one only test in ShardManagerTest and
commented out @Test for the rest but forgot to uncomment
before submitting.

Change-Id: I81d38b62da50c4118a30b0255ba97ba244b8daa5
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerTest.java

index 2f98ec6..a23f007 100644 (file)
@@ -220,7 +220,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         return (T)reply;
     }
 
-    //@Test
+    @Test
     public void testPerShardDatastoreContext() throws Exception {
         LOG.info("testPerShardDatastoreContext starting");
         final DatastoreContextFactory mockFactory = newDatastoreContextFactory(
@@ -322,7 +322,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testPerShardDatastoreContext ending");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryForNonExistentShard() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -337,7 +337,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryForLocalLeaderShard() throws Exception {
         LOG.info("testOnReceiveFindPrimaryForLocalLeaderShard starting");
         new JavaTestKit(getSystem()) {
@@ -371,7 +371,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnReceiveFindPrimaryForLocalLeaderShard ending");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryForNonLocalLeaderShardBeforeMemberUp() throws Exception {
         LOG.info("testOnReceiveFindPrimaryForNonLocalLeaderShardBeforeMemberUp starting");
         new JavaTestKit(getSystem()) {
@@ -398,7 +398,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnReceiveFindPrimaryForNonLocalLeaderShardBeforeMemberUp ending");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryForNonLocalLeaderShard() throws Exception {
         LOG.info("testOnReceiveFindPrimaryForNonLocalLeaderShard starting");
         new JavaTestKit(getSystem()) {
@@ -431,7 +431,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnReceiveFindPrimaryForNonLocalLeaderShard ending");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryForUninitializedShard() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -444,7 +444,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryForInitializedShardWithNoRole() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -460,7 +460,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryForFollowerShardWithNoInitialLeaderId() throws Exception {
         LOG.info("testOnReceiveFindPrimaryForFollowerShardWithNoInitialLeaderId starting");
         new JavaTestKit(getSystem()) {
@@ -496,7 +496,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnReceiveFindPrimaryForFollowerShardWithNoInitialLeaderId starting");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryWaitForShardLeader() throws Exception {
         LOG.info("testOnReceiveFindPrimaryWaitForShardLeader starting");
         datastoreContextBuilder.shardInitializationTimeout(10, TimeUnit.SECONDS);
@@ -542,7 +542,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnReceiveFindPrimaryWaitForShardLeader ending");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryWaitForReadyWithUninitializedShard() throws Exception {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithUninitializedShard starting");
         new JavaTestKit(getSystem()) {
@@ -564,7 +564,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithUninitializedShard ending");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryWaitForReadyWithCandidateShard() throws Exception {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithCandidateShard starting");
         new JavaTestKit(getSystem()) {
@@ -585,7 +585,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithCandidateShard ending");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryWaitForReadyWithIsolatedLeaderShard() throws Exception {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithIsolatedLeaderShard starting");
         new JavaTestKit(getSystem()) {
@@ -606,7 +606,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithIsolatedLeaderShard ending");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindPrimaryWaitForReadyWithNoRoleShard() throws Exception {
         LOG.info("testOnReceiveFindPrimaryWaitForReadyWithNoRoleShard starting");
         new JavaTestKit(getSystem()) {
@@ -698,7 +698,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnReceiveFindPrimaryForRemoteShard ending");
     }
 
-    //@Test
+    @Test
     public void testShardAvailabilityOnChangeOfMemberReachability() throws Exception {
         LOG.info("testShardAvailabilityOnChangeOfMemberReachability starting");
         String shardManagerID = ShardManagerIdentifier.builder().type(shardMrgIDSuffix).build().toString();
@@ -820,7 +820,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testShardAvailabilityOnChangeOfMemberReachability ending");
     }
 
-    //@Test
+    @Test
     public void testShardAvailabilityChangeOnMemberUnreachableAndLeadershipChange() throws Exception {
         LOG.info("testShardAvailabilityChangeOnMemberUnreachableAndLeadershipChange starting");
         String shardManagerID = ShardManagerIdentifier.builder().type(shardMrgIDSuffix).build().toString();
@@ -915,7 +915,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testShardAvailabilityChangeOnMemberUnreachableAndLeadershipChange ending");
     }
 
-    //@Test
+    @Test
     public void testShardAvailabilityChangeOnMemberWithNameContainedInLeaderIdUnreachable() throws Exception {
         LOG.info("testShardAvailabilityChangeOnMemberWithNameContainedInLeaderIdUnreachable starting");
         String shardManagerID = ShardManagerIdentifier.builder().type(shardMrgIDSuffix).build().toString();
@@ -1016,7 +1016,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testShardAvailabilityChangeOnMemberWithNameContainedInLeaderIdUnreachable ending");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindLocalShardForNonExistentShard() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -1033,7 +1033,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindLocalShardForExistentShard() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -1052,7 +1052,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindLocalShardForNotInitializedShard() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -1065,7 +1065,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testOnReceiveFindLocalShardWaitForShardInitialized() throws Exception {
         LOG.info("testOnReceiveFindLocalShardWaitForShardInitialized starting");
         new JavaTestKit(getSystem()) {
@@ -1090,7 +1090,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnReceiveFindLocalShardWaitForShardInitialized starting");
     }
 
-    //@Test
+    @Test
     public void testRoleChangeNotificationAndShardLeaderStateChangedReleaseReady() throws Exception {
         TestShardManager shardManager = newTestShardManager();
 
@@ -1106,7 +1106,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         verify(ready, times(1)).countDown();
     }
 
-    //@Test
+    @Test
     public void testRoleChangeNotificationToFollowerWithShardLeaderStateChangedReleaseReady() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -1129,7 +1129,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testReadyCountDownForMemberUpAfterLeaderStateChanged() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -1152,7 +1152,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testRoleChangeNotificationDoNothingForUnknownShard() throws Exception {
         TestShardManager shardManager = newTestShardManager();
 
@@ -1162,14 +1162,14 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         verify(ready, never()).countDown();
     }
 
-    //@Test
+    @Test
     public void testByDefaultSyncStatusIsFalse() throws Exception {
         TestShardManager shardManager = newTestShardManager();
 
         assertEquals(false, shardManager.getMBean().getSyncStatus());
     }
 
-    //@Test
+    @Test
     public void testWhenShardIsLeaderSyncStatusIsTrue() throws Exception {
         TestShardManager shardManager = newTestShardManager();
 
@@ -1179,7 +1179,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         assertEquals(true, shardManager.getMBean().getSyncStatus());
     }
 
-    //@Test
+    @Test
     public void testWhenShardIsCandidateSyncStatusIsFalse() throws Exception {
         TestShardManager shardManager = newTestShardManager();
 
@@ -1196,7 +1196,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         assertEquals(false, shardManager.getMBean().getSyncStatus());
     }
 
-    //@Test
+    @Test
     public void testWhenShardIsFollowerSyncStatusDependsOnFollowerInitialSyncStatus() throws Exception {
         TestShardManager shardManager = newTestShardManager();
 
@@ -1219,7 +1219,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
 
     }
 
-    //@Test
+    @Test
     public void testWhenMultipleShardsPresentSyncStatusMustBeTrueForAllShards() throws Exception {
         LOG.info("testWhenMultipleShardsPresentSyncStatusMustBeTrueForAllShards starting");
         TestShardManager shardManager = newTestShardManager(newShardMgrProps(new MockConfiguration() {
@@ -1264,7 +1264,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testWhenMultipleShardsPresentSyncStatusMustBeTrueForAllShards ending");
     }
 
-    //@Test
+    @Test
     public void testOnReceiveSwitchShardBehavior() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -1288,7 +1288,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         return Arrays.asList(names).stream().map(MemberName::forName).collect(Collectors.toList());
     }
 
-    //@Test
+    @Test
     public void testOnCreateShard() {
         LOG.info("testOnCreateShard starting");
         new JavaTestKit(getSystem()) {
@@ -1340,7 +1340,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnCreateShard ending");
     }
 
-    //@Test
+    @Test
     public void testOnCreateShardWithLocalMemberNotInShardConfig() {
         LOG.info("testOnCreateShardWithLocalMemberNotInShardConfig starting");
         new JavaTestKit(getSystem()) {
@@ -1372,7 +1372,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnCreateShardWithLocalMemberNotInShardConfig ending");
     }
 
-    //@Test
+    @Test
     public void testOnCreateShardWithNoInitialSchemaContext() {
         LOG.info("testOnCreateShardWithNoInitialSchemaContext starting");
         new JavaTestKit(getSystem()) {
@@ -1404,7 +1404,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testOnCreateShardWithNoInitialSchemaContext ending");
     }
 
-    //@Test
+    @Test
     public void testGetSnapshot() throws Exception {
         LOG.info("testGetSnapshot starting");
         JavaTestKit kit = new JavaTestKit(getSystem());
@@ -1466,7 +1466,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testGetSnapshot ending");
     }
 
-    //@Test
+    @Test
     public void testRestoreFromSnapshot() throws Exception {
         LOG.info("testRestoreFromSnapshot starting");
 
@@ -1506,7 +1506,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testRestoreFromSnapshot ending");
     }
 
-    //@Test
+    @Test
     public void testAddShardReplicaForNonExistentShardConfig() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -1522,7 +1522,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testAddShardReplica() throws Exception {
         LOG.info("testAddShardReplica starting");
         MockConfiguration mockConfig = new MockConfiguration(
@@ -1609,7 +1609,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testAddShardReplica ending");
     }
 
-    //@Test
+    @Test
     public void testAddShardReplicaWithPreExistingReplicaInRemoteShardLeader() throws Exception {
         LOG.info("testAddShardReplicaWithPreExistingReplicaInRemoteShardLeader starting");
         new JavaTestKit(getSystem()) {
@@ -1671,7 +1671,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testAddShardReplicaWithPreExistingReplicaInRemoteShardLeader ending");
     }
 
-    //@Test
+    @Test
     public void testAddShardReplicaWithPreExistingLocalReplicaLeader() throws Exception {
         LOG.info("testAddShardReplicaWithPreExistingLocalReplicaLeader starting");
         new JavaTestKit(getSystem()) {
@@ -1699,7 +1699,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testAddShardReplicaWithPreExistingLocalReplicaLeader ending");
     }
 
-    //@Test
+    @Test
     public void testAddShardReplicaWithAddServerReplyFailure() throws Exception {
         LOG.info("testAddShardReplicaWithAddServerReplyFailure starting");
         new JavaTestKit(getSystem()) {
@@ -1747,13 +1747,13 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testAddShardReplicaWithAddServerReplyFailure ending");
     }
 
-    //@Test
+    @Test
     public void testAddShardReplicaWithAlreadyInProgress() throws Exception {
         testServerChangeWhenAlreadyInProgress("astronauts", new AddShardReplica("astronauts"),
                 AddServer.class, new AddShardReplica("astronauts"));
     }
 
-    //@Test
+    @Test
     public void testAddShardReplicaWithFindPrimaryTimeout() throws Exception {
         LOG.info("testAddShardReplicaWithFindPrimaryTimeout starting");
         datastoreContextBuilder.shardInitializationTimeout(100, TimeUnit.MILLISECONDS);
@@ -1779,7 +1779,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testAddShardReplicaWithFindPrimaryTimeout ending");
     }
 
-    //@Test
+    @Test
     public void testRemoveShardReplicaForNonExistentShard() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -1794,7 +1794,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     /**
      * Primary is Local.
      */
@@ -1826,7 +1826,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testRemoveShardReplicaRemote() throws Exception {
         MockConfiguration mockConfig = new MockConfiguration(
                 ImmutableMap.<String, List<String>>builder().put("default", Arrays.asList("member-1", "member-2"))
@@ -1917,13 +1917,13 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testRemoveShardReplicaWhenAnotherRemoveShardReplicaAlreadyInProgress() throws Exception {
         testServerChangeWhenAlreadyInProgress("astronauts", new RemoveShardReplica("astronauts", MEMBER_2),
                 RemoveServer.class, new RemoveShardReplica("astronauts", MEMBER_3));
     }
 
-    //@Test
+    @Test
     public void testRemoveShardReplicaWhenAddShardReplicaAlreadyInProgress() throws Exception {
         testServerChangeWhenAlreadyInProgress("astronauts", new AddShardReplica("astronauts"),
                 AddServer.class, new RemoveShardReplica("astronauts", MEMBER_2));
@@ -1963,7 +1963,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testServerRemovedShardActorNotRunning() throws Exception {
         LOG.info("testServerRemovedShardActorNotRunning starting");
         new JavaTestKit(getSystem()) {
@@ -1996,7 +1996,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testServerRemovedShardActorNotRunning ending");
     }
 
-    //@Test
+    @Test
     public void testServerRemovedShardActorRunning() throws Exception {
         LOG.info("testServerRemovedShardActorRunning starting");
         new JavaTestKit(getSystem()) {
@@ -2033,7 +2033,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testServerRemovedShardActorRunning ending");
     }
 
-    //@Test
+    @Test
     public void testShardPersistenceWithRestoredData() throws Exception {
         LOG.info("testShardPersistenceWithRestoredData starting");
         new JavaTestKit(getSystem()) {
@@ -2073,7 +2073,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testShardPersistenceWithRestoredData ending");
     }
 
-    //@Test
+    @Test
     public void testShutDown() throws Exception {
         LOG.info("testShutDown starting");
         new JavaTestKit(getSystem()) {
@@ -2118,7 +2118,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         LOG.info("testShutDown ending");
     }
 
-    //@Test
+    @Test
     public void testChangeServersVotingStatus() throws Exception {
         new JavaTestKit(getSystem()) {
             {
@@ -2154,7 +2154,7 @@ public class ShardManagerTest extends AbstractShardManagerTest {
         };
     }
 
-    //@Test
+    @Test
     public void testChangeServersVotingStatusWithNoLeader() throws Exception {
         new JavaTestKit(getSystem()) {
             {

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.