diff options
Diffstat (limited to 'integrity-monitor/src')
4 files changed, 0 insertions, 3451 deletions
diff --git a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/IntegrityMonitorTest.java b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/IntegrityMonitorTest.java deleted file mode 100644 index 68a6cf2f..00000000 --- a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/IntegrityMonitorTest.java +++ /dev/null @@ -1,734 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Integrity Monitor - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.policy.common.im.test; - -import static org.junit.Assert.*; - -import java.util.Date; -import java.util.List; -import java.util.Properties; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.Query; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; -//import org.apache.commons.logging.Log; -//import org.apache.commons.logging.LogFactory; - - - -import org.openecomp.policy.common.im.IntegrityMonitor; -import org.openecomp.policy.common.im.IntegrityMonitorProperties; -import org.openecomp.policy.common.im.StateManagement; -import org.openecomp.policy.common.im.jpa.ForwardProgressEntity; -import org.openecomp.policy.common.im.jpa.ImTestEntity; -import org.openecomp.policy.common.im.jpa.ResourceRegistrationEntity; -import org.openecomp.policy.common.im.jpa.StateManagementEntity; -import org.openecomp.policy.common.logging.flexlogger.FlexLogger; -import org.openecomp.policy.common.logging.flexlogger.Logger; - -public class IntegrityMonitorTest { - private static Logger logger = FlexLogger.getLogger(IntegrityMonitorTest.class); - private static Properties myProp; - private static EntityManagerFactory emf; - private static EntityManager em; - private static EntityTransaction et; - private static String resourceName; - private static Properties systemProps; - - @BeforeClass - public static void setUpClass() throws Exception { - - } - - @AfterClass - public static void tearDownClass() throws Exception { - } - - @Before - public void setUp() throws Exception { - IntegrityMonitor.isUnitTesting = true; - - myProp = new Properties(); - myProp.put(IntegrityMonitorProperties.DB_DRIVER, IntegrityMonitorProperties.DEFAULT_DB_DRIVER); - myProp.put(IntegrityMonitorProperties.DB_URL, IntegrityMonitorProperties.DEFAULT_DB_URL); - myProp.put(IntegrityMonitorProperties.DB_USER, IntegrityMonitorProperties.DEFAULT_DB_USER); - myProp.put(IntegrityMonitorProperties.DB_PWD, IntegrityMonitorProperties.DEFAULT_DB_PWD); - myProp.put(IntegrityMonitorProperties.SITE_NAME, "SiteA"); - myProp.put(IntegrityMonitorProperties.NODE_TYPE, "pap"); - - // set JMX remote port in system properties - systemProps = System.getProperties(); - systemProps.put("com.sun.management.jmxremote.port", "9797"); - - resourceName = "siteA.pap1"; - - //Create the data schema and entity manager factory - emf = Persistence.createEntityManagerFactory("schemaPU", myProp); - - // Create an entity manager to use the DB - em = emf.createEntityManager(); - - } - - - @After - public void tearDown() throws Exception { - // clear jmx remote port setting - systemProps.remove("com.sun.management.jmxremote.port"); - } - - /* - * The following test verifies the following test cases: - * New Install - * New Install - Bad Dependency data - * Recovery from bad dependency data - * Lock - * Lock restart - * Unlock - * Unlock restart - */ - @Ignore // Test passed 10/18/16 - @Test - public void testSanityJmx() throws Exception { - System.out.println("\nIntegrityMonitorTest: Entering testSanityJmx\n\n"); - - String dependent = "group1_logparser"; - - // parameters are passed via a properties file - myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, dependent); - myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, "true"); - IntegrityMonitor.updateProperties(myProp); - - IntegrityMonitor im = IntegrityMonitor.getInstance(resourceName, myProp); - System.out.println("\n\ntestSanityJmx starting im state" - + "\nAdminState = " + im.getStateManager().getAdminState() - + "\nOpState() = " + im.getStateManager().getOpState() - + "\nAvailStatus = " + im.getStateManager().getAvailStatus() - + "\nStandbyStatus = " + im.getStateManager().getStandbyStatus() - + "\n"); - // add an entry to Resource registration table in the DB for the dependent resource - - - et = em.getTransaction(); - et.begin(); - Query rquery = em.createQuery("Select r from ResourceRegistrationEntity r where r.resourceName=:rn"); - rquery.setParameter("rn", dependent); - - @SuppressWarnings("rawtypes") - List rrList = rquery.getResultList(); - ResourceRegistrationEntity rrx = null; - if(rrList.isEmpty()){ - // register resource by adding entry to table in DB - System.out.println("Adding resource " + dependent + " to ResourceRegistration table"); - rrx = new ResourceRegistrationEntity(); - // set columns in entry - rrx.setResourceName(dependent); - rrx.setResourceUrl("service:jmx:somewhere:9999"); - rrx.setNodeType("logparser"); - rrx.setSite("siteA"); - } - em.persist(rrx); - // flush to the DB - em.flush(); - - // commit transaction - et.commit(); - - Thread.sleep(15000); //sleep 15 sec so the FPManager has time to call evaluateSanty() - - boolean sanityPass = true; - try { - im.evaluateSanity(); - } catch (Exception e) { - System.out.println("evaluateSanity exception: " + e); - sanityPass = false; - } - assertFalse(sanityPass); // expect sanity test to fail - - // undo dependency groups and jmx test properties settings - myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, ""); - myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, "false"); - IntegrityMonitor.updateProperties(myProp); - - System.out.println("\ntestSantityJmx ending properties: " + myProp); - - //We know at this point that the IM is disable-dependency. We want to be - //sure it will recover from this condition since the properties were - //updated. - - - System.out.println("\n\ntestSanityJmx ending im state" - + "\nAdminState = " + im.getStateManager().getAdminState() - + "\nOpState() = " + im.getStateManager().getOpState() - + "\nAvailStatus = " + im.getStateManager().getAvailStatus() - + "\nStandbyStatus = " + im.getStateManager().getStandbyStatus() - + "\n"); - - //Destroy the instance - System.out.println("\ntestSanityJmx restarting the IntegrityMonitor"); - IntegrityMonitor.deleteInstance(); - //Create a new instance. It should recover from the disabled-dependency condition - im = IntegrityMonitor.getInstance(resourceName, myProp); - - System.out.println("\n\ntestSanityJmx state after creating new im" - + "\nAdminState = " + im.getStateManager().getAdminState() - + "\nOpState() = " + im.getStateManager().getOpState() - + "\nAvailStatus = " + im.getStateManager().getAvailStatus() - + "\nStandbyStatus = " + im.getStateManager().getStandbyStatus() - + "\n"); - - //Verify the state - assertEquals(im.getStateManager().getAdminState(), StateManagement.UNLOCKED); - assertEquals(im.getStateManager().getOpState(), StateManagement.ENABLED); - assertEquals(im.getStateManager().getAvailStatus(), StateManagement.NULL_VALUE); - assertEquals(im.getStateManager().getStandbyStatus(), StateManagement.NULL_VALUE); - - //Test state manager via the IntegrityMonitor - StateManagement sm = im.getStateManager(); - - // Verify lock state - sm.lock(); - System.out.println("\n\nsm.lock()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getAdminState().equals(StateManagement.LOCKED)); - - //Verify lock persists across a restart - //Destroy the instance - System.out.println("\ntestSanityJmx restarting the IntegrityMonitor"); - IntegrityMonitor.deleteInstance(); - //Create a new instance. It should come up with the admin state locked - im = IntegrityMonitor.getInstance(resourceName, myProp); - sm = im.getStateManager(); - System.out.println("\n\ntestSanityJmx restart with AdminState=locked" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getAdminState().equals(StateManagement.LOCKED)); - - // Verify unlock - sm.unlock(); - System.out.println("\n\ntestSanityJmx sm.unlock" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getAdminState().equals(StateManagement.UNLOCKED)); - - // Verify unlock restart - //Destroy the instance - System.out.println("\ntestSanityJmx restarting the IntegrityMonitor"); - IntegrityMonitor.deleteInstance(); - //Create a new instance. It should come up with the admin state locked - im = IntegrityMonitor.getInstance(resourceName, myProp); - sm = im.getStateManager(); - System.out.println("\n\ntestSanityJmx restart with AdminState=unlocked" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getAdminState().equals(StateManagement.UNLOCKED)); - - System.out.println("\n\ntestSanityJmx: Exit\n\n"); - } - - - @Ignore // Test passed 10/18/16 - @Test - public void testIM() throws Exception { - System.out.println("\nIntegrityMonitorTest: Entering testIM\n\n"); - - // parameters are passed via a properties file - - /* - * Create an IntegrityMonitor - * NOTE: This uses the database that was created above. So, this MUST follow the creation - * of the DB - */ - IntegrityMonitor im = IntegrityMonitor.getInstance(resourceName, myProp); - - System.out.println("\n\nim before sleep" - + "\nAdminState = " + im.getStateManager().getAdminState() - + "\nOpState() = " + im.getStateManager().getOpState() - + "\nAvailStatus = " + im.getStateManager().getAvailStatus() - + "\nStandbyStatus = " + im.getStateManager().getStandbyStatus() - + "\n"); - - // wait for test transactions to fire and increment fpc - Thread.sleep(20000); - - System.out.println("\n\nim after sleep" - + "\nAdminState = " + im.getStateManager().getAdminState() - + "\nOpState() = " + im.getStateManager().getOpState() - + "\nAvailStatus = " + im.getStateManager().getAvailStatus() - + "\nStandbyStatus = " + im.getStateManager().getStandbyStatus() - + "\n"); - - // test evaluate sanity - boolean sanityPass = true; - try { - im.evaluateSanity(); - } catch (Exception e) { - System.out.println("evaluateSanity exception: " + e); - sanityPass = false; - } - assertTrue(sanityPass); // expect sanity test to pass - - //Test startTransaction - should works since it is unlocked - boolean transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(transPass); - - //Test state manager via the IntegrityMonitor - StateManagement sm = im.getStateManager(); - - sm.lock(); - System.out.println("\n\nsm.lock()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getAdminState().equals(StateManagement.LOCKED)); - - //test startTransaction. It should fail since it is locked - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(!transPass); //expect it to fail - - sm.unlock(); - System.out.println("\n\nsm.unlock()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getAdminState().equals(StateManagement.UNLOCKED)); - - //test startTransaction. It should succeed - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(transPass); //expect it to succeed - - sm.disableDependency(); - System.out.println("\n\nsm.disableDependency()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getOpState().equals(StateManagement.DISABLED)); - assert(sm.getAvailStatus().equals(StateManagement.DEPENDENCY)); - - //test startTransaction. It should succeed since standby status is null and unlocked - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(transPass); //expect it to succeed - - sm.enableNoDependency(); - System.out.println("\n\nsm.enableNoDependency()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getOpState().equals(StateManagement.ENABLED)); - //test startTransaction. It should succeed since standby status is null and unlocked - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(transPass); //expect it to succeed - - - sm.disableFailed(); - System.out.println("\n\nsm.disableFailed()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getOpState().equals(StateManagement.DISABLED)); - assert(sm.getAvailStatus().equals(StateManagement.FAILED)); - //test startTransaction. It should succeed since standby status is null and unlocked - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(transPass); //expect it to succeed - - sm.enableNotFailed(); - System.out.println("\n\nsm.enabledNotFailed()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getOpState().equals(StateManagement.ENABLED)); - //test startTransaction. It should succeed since standby status is null and unlocked - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(transPass); //expect it to succeed - - sm.demote(); - System.out.println("\n\nsm.demote()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getStandbyStatus().equals(StateManagement.HOT_STANDBY)); - - //test startTransaction. It should fail since it is standby - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(!transPass); //expect it to fail - - sm.promote(); - System.out.println("\n\nsm.promote()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getStandbyStatus().equals(StateManagement.PROVIDING_SERVICE)); - - //test startTransaction. It should succeed since it is providing service - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(transPass); //expect it to succeed - - - //Test the multi-valued availability status - sm.disableDependency(); - sm.disableFailed(); - System.out.println("\n\nsm.disableDependency(), sm.disableFailed" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getAvailStatus().equals(StateManagement.DEPENDENCY_FAILED)); - - //Test startTransaction. Should fail since standby status is cold standby - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(!transPass); //expect it to fail - - sm.enableNoDependency(); - System.out.println("\n\nsm.enableNoDependency()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getAvailStatus().equals(StateManagement.FAILED)); - //Test startTransaction. Should fail since standby status is cold standby - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(!transPass); //expect it to fail - - sm.disableDependency(); - sm.enableNotFailed(); - System.out.println("\n\nsm.disableDependency(),sm.enableNotFailed()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getAvailStatus().equals(StateManagement.DEPENDENCY)); - //Test startTransaction. Should fail since standby status is cold standby - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(!transPass); //expect it to fail - - sm.enableNoDependency(); - System.out.println("\n\nsm.enableNoDependency()" - + "\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - assert(sm.getOpState().equals(StateManagement.ENABLED)); - //test startTransaction. It should fail since standby status is hot standby - transPass = true; - try{ - im.startTransaction(); - } catch (Exception e){ - System.out.println("startTransaction exception: " + e); - transPass = false; - } - assertTrue(!transPass); //expect it to fail - - System.out.println("\n\ntestIM: Exit\n\n"); - } - - - @Ignore // Test passed 10/18/16 - @Test - public void testSanityState() throws Exception { - System.out.println("\nIntegrityMonitorTest: Entering testSanityState\n\n"); - - // parameters are passed via a properties file - myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, "group1_dep1,group1_dep2; group2_dep1"); - IntegrityMonitor.updateProperties(myProp); - - IntegrityMonitor im = IntegrityMonitor.getInstance(resourceName, myProp); - - // Add a group1 dependent resources to put an entry in the forward progress table - ForwardProgressEntity fpe = new ForwardProgressEntity(); - ForwardProgressEntity fpe2 = new ForwardProgressEntity(); - fpe.setFpcCount(0); - fpe.setResourceName("group1_dep1"); - fpe2.setFpcCount(0); - fpe2.setResourceName("group1_dep2"); - et = em.getTransaction(); - et.begin(); - em.persist(fpe); - em.persist(fpe2); - em.flush(); - et.commit(); - - - // Add a group2 dependent resource to the StateManagementEntity DB table and set its admin state to locked - // Expect sanity test to fail. - StateManagement stateManager = new StateManagement(emf, "group2_dep1"); - stateManager.lock(); - - //Now add new group1 stateManager instances - StateManagement sm2 = new StateManagement(emf, "group1_dep1"); - StateManagement sm3 = new StateManagement(emf, "group1_dep2"); - - boolean sanityPass = true; - Thread.sleep(15000); - try { - im.evaluateSanity(); - } catch (Exception e) { - System.out.println("evaluateSanity exception: " + e); - sanityPass = false; - } - assertFalse(sanityPass); // expect sanity test to fail - - // undo dependency groups and jmx test properties settings - myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, ""); - myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, "false"); - IntegrityMonitor.updateProperties(myProp); - - et = em.getTransaction(); - - et.begin(); - // Make sure we leave the DB clean - em.createQuery("DELETE FROM StateManagementEntity").executeUpdate(); - em.createQuery("DELETE FROM ResourceRegistrationEntity").executeUpdate(); - em.createQuery("DELETE FROM ForwardProgressEntity").executeUpdate(); - - em.flush(); - et.commit(); - - System.out.println("\n\ntestSanityState: Exit\n\n"); - } - - @Ignore // Test passed 10/18/16 - @Test - public void testRefreshStateAudit() throws Exception { - logger.debug("\nIntegrityMonitorTest: testRefreshStateAudit Enter\n\n"); - - // parameters are passed via a properties file - myProp.put(IntegrityMonitorProperties.DEPENDENCY_GROUPS, ""); - myProp.put(IntegrityMonitorProperties.TEST_VIA_JMX, "false"); - IntegrityMonitor.updateProperties(myProp); - - et = em.getTransaction(); - et.begin(); - - // Make sure we leave the DB clean - em.createQuery("DELETE FROM StateManagementEntity").executeUpdate(); - em.createQuery("DELETE FROM ResourceRegistrationEntity").executeUpdate(); - em.createQuery("DELETE FROM ForwardProgressEntity").executeUpdate(); - - em.flush(); - et.commit(); - - IntegrityMonitor.deleteInstance(); - - IntegrityMonitor im = IntegrityMonitor.getInstance(resourceName, myProp); - - //the state here is unlocked, enabled, null, null - StateManagementEntity sme = null; - - Query query = em.createQuery("Select p from StateManagementEntity p where p.resourceName=:resource"); - - query.setParameter("resource", resourceName); - - //Just test that we are retrieving the right object - @SuppressWarnings("rawtypes") - List resourceList = query.getResultList(); - if (!resourceList.isEmpty()) { - // exist - sme = (StateManagementEntity) resourceList.get(0); - em.refresh(sme); - - logger.debug("??? -- Retrieve StateManagementEntity from database --" - + "\nsme.getResourceName() = " + sme.getResourceName() - + "\nsme.getAdminState() = " + sme.getAdminState() - + "\nsme.getOpState() = " + sme.getOpState() - + "\nsme.getAvailStatus() = " + sme.getAvailStatus() - + "\nsme.getStandbyStatus() = " + sme.getStandbyStatus()); - - assertTrue(sme.getAdminState().equals(StateManagement.UNLOCKED)); - assertTrue(sme.getOpState().equals(StateManagement.ENABLED)); - assertTrue(sme.getAvailStatus().equals(StateManagement.NULL_VALUE)); - assertTrue(sme.getStandbyStatus().equals(StateManagement.NULL_VALUE)); - logger.debug("--"); - } else { - logger.debug("Record not found, resourceName: " + resourceName); - assertTrue(false); - } - - et = em.getTransaction(); - et.begin(); - - sme.setStandbyStatus(StateManagement.COLD_STANDBY); - em.persist(sme); - em.flush(); - et.commit(); - - Thread.sleep(65000); - - //The refreshStateAudit should run and change the state to unlocked,enabled,null,hotstandby - StateManagementEntity sme1 = null; - - Query query1 = em.createQuery("Select p from StateManagementEntity p where p.resourceName=:resource"); - - query1.setParameter("resource", resourceName); - - //Just test that we are retrieving the right object - @SuppressWarnings("rawtypes") - List resourceList1 = query1.getResultList(); - if (!resourceList1.isEmpty()) { - // exist - sme1 = (StateManagementEntity) resourceList1.get(0); - em.refresh(sme1); - logger.debug("??? -- Retrieve StateManagementEntity from database --" - + "\nsme1.getResourceName() = " + sme1.getResourceName() - + "\nsme1.getAdminState() = " + sme1.getAdminState() - + "\nsme1.getOpState() = " + sme1.getOpState() - + "\nsme1.getAvailStatus() = " + sme1.getAvailStatus() - + "\nsme1.getStandbyStatus() = " + sme1.getStandbyStatus()); - - assertTrue(sme1.getAdminState().equals(StateManagement.UNLOCKED)); - assertTrue(sme1.getOpState().equals(StateManagement.ENABLED)); - assertTrue(sme1.getAvailStatus().equals(StateManagement.NULL_VALUE)); - assertTrue(sme1.getStandbyStatus().equals(StateManagement.HOT_STANDBY)); - logger.debug("--"); - } else { - logger.debug("Record not found, resourceName: " + resourceName); - assertTrue(false); - } - - et = em.getTransaction(); - et.begin(); - - // Make sure we leave the DB clean - em.createQuery("DELETE FROM StateManagementEntity").executeUpdate(); - em.createQuery("DELETE FROM ResourceRegistrationEntity").executeUpdate(); - em.createQuery("DELETE FROM ForwardProgressEntity").executeUpdate(); - - em.flush(); - et.commit(); - - IntegrityMonitor.deleteInstance(); - - logger.debug("\nIntegrityMonitorTest: testRefreshStateAudit Exit\n\n"); - } -} diff --git a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementEntityTest.java b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementEntityTest.java deleted file mode 100644 index 9fb6ddf4..00000000 --- a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementEntityTest.java +++ /dev/null @@ -1,195 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Integrity Monitor - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.policy.common.im.test; - -import static org.junit.Assert.*; - -import java.util.Date; -import java.util.List; -import java.util.Properties; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; -import javax.persistence.Query; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -//import org.apache.commons.logging.Log; -//import org.apache.commons.logging.LogFactory; - -import org.openecomp.policy.common.im.StateManagement; -import org.openecomp.policy.common.im.jpa.StateManagementEntity; -import org.openecomp.policy.common.logging.flexlogger.FlexLogger; -import org.openecomp.policy.common.logging.flexlogger.Logger; - -public class StateManagementEntityTest { - private static Logger logger = FlexLogger.getLogger(StateManagementEntityTest.class); - - private static final String DEFAULT_DB_DRIVER = "org.h2.Driver"; - private static final String DEFAULT_DB_URL = "jdbc:h2:file:./sql/smTest"; - //private static final String DEFAULT_DB_URL = "jdbc:h2:file:./sql/xacml"; - private static final String DEFAULT_DB_USER = "sa"; - private static final String DEFAULT_DB_PWD = ""; - - /* - private static final String DEFAULT_DB_DRIVER = "org.mariadb.jdbc.Driver"; - private static final String DEFAULT_DB_URL = "jdbc:mariadb://localhost:3306/xacml"; - private static final String DEFAULT_DB_USER = "policy_user"; - private static final String DEFAULT_DB_PWD = "policy_user"; - */ - - private static final String DB_DRIVER = "javax.persistence.jdbc.driver"; - private static final String DB_URL = "javax.persistence.jdbc.url"; - private static final String DB_USER = "javax.persistence.jdbc.user"; - private static final String DB_PWD = "javax.persistence.jdbc.password"; - - @BeforeClass - public static void setUpClass() throws Exception { - - } - - @AfterClass - public static void tearDownClass() throws Exception { - } - - @Before - public void setUp() throws Exception { - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testJPA() throws Exception { - System.out.println("\n??? logger.infor StateManagementEntityTest: Entering\n\n"); - - Properties myProp = new Properties(); - myProp.put(DB_DRIVER, DEFAULT_DB_DRIVER); - myProp.put(DB_URL, DEFAULT_DB_URL); - myProp.put(DB_USER, DEFAULT_DB_USER); - myProp.put(DB_PWD, DEFAULT_DB_PWD); - - System.out.println("??? " + DB_DRIVER + "=" + DEFAULT_DB_DRIVER); - System.out.println("??? " + DB_URL + "=" + DEFAULT_DB_URL); - System.out.println("??? " + DB_USER + "=" + DEFAULT_DB_USER); - System.out.println("??? " + DB_PWD + "=" + DEFAULT_DB_PWD); - - //Create the data schema and entity manager factory - System.out.println("??? createEntityManagerFactory for schemaPU"); - EntityManagerFactory emf = Persistence.createEntityManagerFactory("schemaPU", myProp); - - // Create an entity manager to use the DB - System.out.println("??? createEntityManager"); - EntityManager em = emf.createEntityManager(); - System.out.println("??? getTransaction"); - EntityTransaction et = em.getTransaction(); - et.begin(); - // Make sure the DB is clean - System.out.println("??? clean StateManagementEntity"); - em.createQuery("DELETE FROM StateManagementEntity").executeUpdate(); - - //Define the resourceName for the StateManagement constructor - String resourceName = "test_resource1"; - - // - System.out.println("Create StateManagementEntity, resourceName: " + resourceName); - System.out.println("??? instantiate StateManagementEntity object"); - StateManagementEntity sme = new StateManagementEntity(); - - System.out.println("??? setResourceName : " + resourceName); - sme.setResourceName(resourceName); - System.out.println("??? getResourceName : " + sme.getResourceName()); - - System.out.println("??? setAdminState : " + StateManagement.UNLOCKED); - sme.setAdminState(StateManagement.UNLOCKED); - System.out.println("??? getAdminState : " + sme.getAdminState()); - - System.out.println("??? setOpState : " + StateManagement.ENABLED); - sme.setOpState(StateManagement.ENABLED); - System.out.println("??? getOpState : " + sme.getOpState()); - - System.out.println("??? setAvailStatus : " + StateManagement.NULL_VALUE); - sme.setAvailStatus(StateManagement.NULL_VALUE); - System.out.println("??? getAvailStatus : " + sme.getAvailStatus()); - - System.out.println("??? setStandbyStatus: " + StateManagement.COLD_STANDBY); - sme.setStandbyStatus(StateManagement.COLD_STANDBY); - System.out.println("??? getStandbyStatus: " + sme.getStandbyStatus()); - - System.out.println("??? before persist"); - em.persist(sme); - System.out.println("??? after persist"); - - em.flush(); - System.out.println("??? after flush"); - - et.commit(); - System.out.println("??? after commit"); - - try { - Query query = em.createQuery("Select p from StateManagementEntity p where p.resourceName=:resource"); - - query.setParameter("resource", resourceName); - - //Just test that we are retrieving the right object - @SuppressWarnings("rawtypes") - List resourceList = query.getResultList(); - String resource = null; - if (!resourceList.isEmpty()) { - // exist - StateManagementEntity sme2 = (StateManagementEntity) resourceList.get(0); - System.out.println("??? -- Retrieve StateManagementEntity from database --" - + "\n\nsme.getResourceName() = " + sme.getResourceName() - + "\nsme2getResourceName() = " + sme2.getResourceName() - + "\n\nsme.getAdminState() = " + sme.getAdminState() - + "\nsme2.getAdminState() = " + sme2.getAdminState() - + "\n\nsme.getOpState() = " + sme.getOpState() - + "\nsme2.getOpState() = " + sme2.getOpState() - + "\n\nsme.getAvailStatus() = " + sme.getAvailStatus() - + "\nsme2.getAvailStatus() = " + sme.getAvailStatus() - + "\n\nsme.getStandbyStatus() = " + sme.getStandbyStatus() - + "\nsme2.getStandbyStatus() = " + sme2.getStandbyStatus()); - - - assert(sme2.getResourceName().equals(sme.getResourceName())); - assert(sme2.getAdminState().equals(sme.getAdminState())); - assert(sme2.getOpState().equals(sme.getOpState())); - assert(sme2.getAvailStatus().equals(sme.getAvailStatus())); - assert(sme2.getStandbyStatus().equals(sme.getStandbyStatus())); - System.out.println("--"); - } else { - System.out.println("Record not found, resourceName: " + resourceName); - } - } catch(Exception ex) { - logger.error("Exception on select query: " + ex.toString()); - } - - em.close(); - System.out.println("\n??? after close"); - System.out.println("\n\nJpaTest: Exit\n\n"); - } -} diff --git a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementTest.java b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementTest.java deleted file mode 100644 index 8b6dbf52..00000000 --- a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateManagementTest.java +++ /dev/null @@ -1,336 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Integrity Monitor - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.policy.common.im.test; - -import static org.junit.Assert.*; - -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; -import java.util.StringTokenizer; -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.Persistence; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.LockModeType; -import javax.persistence.PersistenceException; -import javax.persistence.Query; - - - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.openecomp.policy.common.im.StateManagement; -import org.openecomp.policy.common.im.StateTransition; -import org.openecomp.policy.common.im.StandbyStatusException; -import org.openecomp.policy.common.im.StateChangeNotifier; -import org.openecomp.policy.common.logging.flexlogger.FlexLogger; -import org.openecomp.policy.common.logging.flexlogger.Logger; - -public class StateManagementTest { - private static Logger logger = FlexLogger.getLogger(StateManagementTest.class); - - private static final String DEFAULT_DB_DRIVER = "org.h2.Driver"; - private static final String DEFAULT_DB_URL = "jdbc:h2:file:./sql/smTest"; - private static final String DEFAULT_DB_USER = "sa"; - private static final String DEFAULT_DB_PWD = ""; - - private static final String DB_DRIVER = "javax.persistence.jdbc.driver"; - private static final String DB_URL = "javax.persistence.jdbc.url"; - private static final String DB_USER = "javax.persistence.jdbc.user"; - private static final String DB_PWD = "javax.persistence.jdbc.password"; - // - - @BeforeClass - public static void setUpClass() throws Exception { - - } - - @AfterClass - public static void tearDownClass() throws Exception { - } - - @Before - public void setUp() throws Exception { - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testJPA() throws Exception { - logger.info("\n\nlogger.infor StateManagementTest: Entering\n\n"); - String resourceName = "test_resource1"; - boolean standbyExceptionThrown = false; - - //These parameters are in a properties file - EntityManagerFactory emf = null; - try { - Properties myProp = new Properties(); - myProp.put(DB_DRIVER, DEFAULT_DB_DRIVER); - myProp.put(DB_URL, DEFAULT_DB_URL); - myProp.put(DB_USER, DEFAULT_DB_USER); - myProp.put(DB_PWD, DEFAULT_DB_PWD); - - //Create the data schema and entity manager factory - emf = Persistence.createEntityManagerFactory("schemaPU", myProp); - - StateManagement sm = new StateManagement(emf, resourceName); - System.out.println("\n\ntest lock()"); - displayState(resourceName, sm); - logger.info("\n??? test lock()"); - logger.info(resourceName + " before adminState = " + sm.getAdminState()); - logger.info(resourceName + " before opState = " + sm.getOpState()); - logger.info(resourceName + " before availStatus = " + sm.getAvailStatus()); - logger.info(resourceName + " before standbyStatus= " + sm.getStandbyStatus()); - sm.lock(); - System.out.println("\n\nafter lock()"); - displayState(resourceName, sm); - logger.info(resourceName + " after adminState = " + sm.getAdminState()); - logger.info(resourceName + " after opState = " + sm.getOpState()); - logger.info(resourceName + " after availStatus = " + sm.getAvailStatus()); - logger.info(resourceName + " after standbyStatus= " + sm.getStandbyStatus()); - - logger.info("\n??? test unlock()"); - sm.unlock(); - System.out.println("\n\nafter unlock()"); - displayState(resourceName, sm); - logger.info(resourceName + " adminState = " + sm.getAdminState()); - logger.info(resourceName + " opState = " + sm.getOpState()); - logger.info(resourceName + " availStatus = " + sm.getAvailStatus()); - logger.info(resourceName + " standbyStatus= " + sm.getStandbyStatus()); - - logger.info("\n??? test enableNotFailed()"); - sm.enableNotFailed(); - System.out.println("\n\nafter enableNotFailed()"); - displayState(resourceName, sm); - logger.info(resourceName + " adminState = " + sm.getAdminState()); - logger.info(resourceName + " opState = " + sm.getOpState()); - logger.info(resourceName + " availStatus = " + sm.getAvailStatus()); - logger.info(resourceName + " standbyStatus= " + sm.getStandbyStatus()); - - logger.info("\n??? test disableFailed()"); - sm.disableFailed(); - System.out.println("\n\nafter disableFailed()"); - displayState(resourceName, sm); - logger.info(resourceName + " adminState = " + sm.getAdminState()); - logger.info(resourceName + " opState = " + sm.getOpState()); - logger.info(resourceName + " availStatus = " + sm.getAvailStatus()); - logger.info(resourceName + " standbyStatus= " + sm.getStandbyStatus()); - - // P4 If promote() is called while either the opState is disabled or the adminState is locked, - // the standbystatus shall transition to coldstandby and a StandbyStatusException shall be thrown - logger.info("\n??? promote() test case P4"); - try { - sm.disableFailed(); - sm.lock(); - System.out.println("\n\nafter lock() and disableFailed"); - displayState(resourceName, sm); - logger.info(resourceName + " adminState = " + sm.getAdminState()); - logger.info(resourceName + " opState = " + sm.getOpState()); - logger.info(resourceName + " standbyStatus= " + sm.getStandbyStatus()); - sm.promote(); - System.out.println("\n\nafter promote"); - displayState(resourceName, sm); - } catch(StandbyStatusException ex) { - standbyExceptionThrown = true; - logger.info("StandbyStatusException thrown and catched"); - } catch(Exception ex) { - logger.info("??? Exception: " + ex.toString()); - } - assert(standbyExceptionThrown); - assert(sm.getStandbyStatus().equals(StateManagement.COLD_STANDBY)); - standbyExceptionThrown = false; - - // P3 If promote() is called while standbyStatus is coldstandby, the state shall not transition - // and a StandbyStatusException shall be thrown - logger.info("\n??? promote() test case P3"); - try { - logger.info(resourceName + " standbyStatus= " + sm.getStandbyStatus()); - sm.promote(); - } catch(StandbyStatusException ex) { - standbyExceptionThrown = true; - logger.info("StandbyStatusException thrown and catched"); - } catch(Exception ex) { - logger.info("??? Exception: " + ex.toString()); - } - assert(standbyExceptionThrown); - assert(sm.getStandbyStatus().equals(StateManagement.COLD_STANDBY)); - System.out.println("\n\nP3 after promote()"); - displayState(resourceName, sm); - standbyExceptionThrown = false; - - // P2 If promote() is called while the standbyStatus is null and the opState is enabled and adminState is unlocked, - // the state shall transition to providingservice - logger.info("\n??? promote() test case P2"); - resourceName = "test_resource2"; - StateManagement sm2 = new StateManagement(emf, resourceName); - sm2.enableNotFailed(); - sm2.unlock(); - System.out.println("\n\nafter sm2.enableNotFailed() and sm2.unlock()"); - displayState(resourceName, sm2); - logger.info(resourceName + " adminState = " + sm2.getAdminState()); - logger.info(resourceName + " opState = " + sm2.getOpState()); - logger.info(resourceName + " standbyStatus= " + sm2.getStandbyStatus()); - sm2.promote(); - System.out.println("\n\nP2 after sm2.promote"); - displayState(resourceName, sm2); - assert(sm2.getAdminState().equals(StateManagement.UNLOCKED)); - assert(sm2.getOpState().equals(StateManagement.ENABLED)); - assert(sm2.getStandbyStatus().equals(StateManagement.PROVIDING_SERVICE)); - - // P5 If promote() is called while standbyStatus is providingservice, no action is taken - logger.info("\n??? promote() test case P5"); - logger.info(resourceName + " standbyStatus= " + sm2.getStandbyStatus()); - sm2.promote(); - System.out.println("\n\nP5 after sm2.promote()"); - displayState(resourceName, sm2); - assert(sm2.getStandbyStatus().equals(StateManagement.PROVIDING_SERVICE)); - - // D1 If demote() is called while standbyStatus is providingservice, the state shall transition to hotstandby - logger.info("\n??? demote() test case D1"); - logger.info(resourceName + " standbyStatus= " + sm2.getStandbyStatus()); - sm2.demote(); - System.out.println("\n\nD1 after sm2.demote()"); - displayState(resourceName, sm2); - assert(sm2.getStandbyStatus().equals(StateManagement.HOT_STANDBY)); - - // D4 If demote() is called while standbyStatus is hotstandby, no action is taken - logger.info("\n??? demote() test case D4"); - logger.info(resourceName + " standbyStatus= " + sm2.getStandbyStatus()); - sm2.demote(); - System.out.println("\n\nD4 after sm2.demote()"); - displayState(resourceName, sm2); - assert(sm2.getStandbyStatus().equals(StateManagement.HOT_STANDBY)); - - // D3 If demote() is called while standbyStatus is null and adminState is locked or opState is disabled, - // the state shall transition to coldstandby - logger.info("\n??? demote() test case D3"); - resourceName = "test_resource3"; - StateManagement sm3 = new StateManagement(emf, resourceName); - sm3.lock(); - sm3.disableFailed(); - System.out.println("\n\nD3 after sm3.lock() and sm3.disableFailed()"); - displayState(resourceName, sm3); - logger.info(resourceName + " adminState = " + sm3.getAdminState()); - logger.info(resourceName + " opState = " + sm3.getOpState()); - logger.info(resourceName + " standbyStatus= " + sm3.getStandbyStatus()); - sm3.demote(); - System.out.println("\n\nD3 after sm3.demote()"); - displayState(resourceName, sm3); - assert(sm3.getStandbyStatus().equals(StateManagement.COLD_STANDBY)); - - // D5 If demote() is called while standbyStatus is coldstandby, no action is taken - logger.info("\n??? demote() test case D5"); - logger.info(resourceName + " standbyStatus= " + sm3.getStandbyStatus()); - sm3.demote(); - System.out.println("\n\nD5 after sm3.demote()"); - displayState(resourceName, sm3); - assert(sm3.getStandbyStatus().equals(StateManagement.COLD_STANDBY)); - - // D2 If demote() is called while standbyStatus is null and adminState is unlocked and opState is enabled, - // the state shall transition to hotstandby - logger.info("\n??? demote() test case D2"); - resourceName = "test_resource4"; - StateManagement sm4 = new StateManagement(emf, resourceName); - sm4.unlock(); - sm4.enableNotFailed(); - System.out.println("\n\nD2 after sm4.unlock() and sm4.enableNotFailed()"); - displayState(resourceName, sm4); - logger.info(resourceName + " adminState = " + sm4.getAdminState()); - logger.info(resourceName + " opState = " + sm4.getOpState()); - logger.info(resourceName + " standbyStatus= " + sm4.getStandbyStatus()); - sm4.demote(); - assert(sm4.getStandbyStatus().equals(StateManagement.HOT_STANDBY)); - - // P1 If promote() is called while standbyStatus is hotstandby, the state shall transition to providingservice. - logger.info("\n??? promote() test case P1"); - logger.info(resourceName + " standbyStatus= " + sm4.getStandbyStatus()); - sm4.promote(); - System.out.println("\n\nP1 after sm4.promote()"); - displayState(resourceName, sm4); - assert(sm4.getStandbyStatus().equals(StateManagement.PROVIDING_SERVICE)); - - // State change notification - logger.info("\n??? State change notification test case 1 - lock()"); - StateChangeNotifier stateChangeNotifier = new StateChangeNotifier(); - sm.addObserver(stateChangeNotifier); - sm.lock(); - - logger.info("\n??? State change notification test case 2 - unlock()"); - sm.unlock(); - - logger.info("\n??? State change notification test case 3 - enabled()"); - sm.enableNotFailed(); - - logger.info("\n??? State change notification test case 4 - disableFailed()"); - sm.disableFailed(); - - logger.info("\n??? State change notification test case 5 - demote()"); - sm.demote(); - - logger.info("\n??? State change notification test case 6 - promote()"); - try { - sm.promote(); - } catch(Exception ex) { - logger.info("Exception from promote(): " + ex.toString()); - } - - if (emf.isOpen()) { - emf.close(); - } - } catch(Exception ex) { - logger.error("Exception: " + ex.toString()); - } finally { - if (emf.isOpen()) { - emf.close(); - } - } - - logger.info("\n\nStateManagementTest: Exit\n\n"); - } - - private void displayState(String resourceName, StateManagement sm) - { - System.out.println("\nAdminState = " + sm.getAdminState() - + "\nOpState() = " + sm.getOpState() - + "\nAvailStatus = " + sm.getAvailStatus() - + "\nStandbyStatus = " + sm.getStandbyStatus() - + "\n"); - logger.info(resourceName + " adminState = " + sm.getAdminState()); - logger.info(resourceName + " opState = " + sm.getOpState()); - logger.info(resourceName + " availStatus = " + sm.getAvailStatus()); - logger.info(resourceName + " standbyStatus= " + sm.getStandbyStatus()); - } -} - diff --git a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateTransitionTest.java b/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateTransitionTest.java deleted file mode 100644 index a93a4ad3..00000000 --- a/integrity-monitor/src/test/java/org/openecomp/policy/common/im/test/StateTransitionTest.java +++ /dev/null @@ -1,2186 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Integrity Monitor - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.policy.common.im.test; - -import static org.junit.Assert.*; - -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; -import java.util.StringTokenizer; -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.IOException; - -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.EntityTransaction; -import javax.persistence.Persistence; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -//import org.apache.commons.logging.Log; -//import org.apache.commons.logging.LogFactory; - -import org.openecomp.policy.common.im.StateTransition; -import org.openecomp.policy.common.im.StateElement; -import org.openecomp.policy.common.im.StandbyStatusException; -import org.openecomp.policy.common.im.StateChangeNotifier; -import org.openecomp.policy.common.logging.flexlogger.FlexLogger; -import org.openecomp.policy.common.logging.flexlogger.Logger; - -public class StateTransitionTest { - private static Logger logger = FlexLogger.getLogger(StateTransitionTest.class); - - private static final String DEFAULT_DB_DRIVER = "org.h2.Driver"; - private static final String DEFAULT_DB_URL = "jdbc:h2:file:./sql/smTest"; - private static final String DEFAULT_DB_USER = "sa"; - private static final String DEFAULT_DB_PWD = ""; - - private static final String DB_DRIVER = "javax.persistence.jdbc.driver"; - private static final String DB_URL = "javax.persistence.jdbc.url"; - private static final String DB_USER = "javax.persistence.jdbc.user"; - private static final String DB_PWD = "javax.persistence.jdbc.password"; - // - - @BeforeClass - public static void setUpClass() throws Exception { - - } - - @AfterClass - public static void tearDownClass() throws Exception { - } - - @Before - public void setUp() throws Exception { - } - - @After - public void tearDown() throws Exception { - } - - @Test - public void testJPA() throws Exception { - logger.info("\n\nlogger.infor StateTransitionTest: Entering\n\n"); - boolean standbyExceptionThrown = false; - - //These parameters are in a properties file - EntityManagerFactory emf = null; - try { - Properties myProp = new Properties(); - myProp.put(DB_DRIVER, DEFAULT_DB_DRIVER); - myProp.put(DB_URL, DEFAULT_DB_URL); - myProp.put(DB_USER, DEFAULT_DB_USER); - myProp.put(DB_PWD, DEFAULT_DB_PWD); - - logger.info("??? create a new StateTransition"); - StateTransition st = new StateTransition(); - - StateElement se = null; - try { - // bad test case - se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "lock"); - // - logger.info("??? StateTransition testcase 1"); - se = st.getEndingState("unlocked", "enabled", "null", "null", "lock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 2"); - se = st.getEndingState("unlocked", "enabled", "null", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 3"); - se = st.getEndingState("unlocked", "enabled", "null", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 4"); - se = st.getEndingState("unlocked", "enabled", "null", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 5"); - se = st.getEndingState("unlocked", "enabled", "null", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 6"); - se = st.getEndingState("unlocked", "enabled", "null", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 7"); - se = st.getEndingState("unlocked", "enabled", "null", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 8"); - se = st.getEndingState("unlocked", "enabled", "null", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 9"); - se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 10"); - se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 11"); - se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 12"); - se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 13"); - se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 14"); - se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 15"); - se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 16"); - se = st.getEndingState("unlocked", "enabled", "null", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 17"); - se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 18"); - se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 19"); - se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 20"); - se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 21"); - se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 22"); - se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 23"); - se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 24"); - se = st.getEndingState("unlocked", "enabled", "null", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 25"); - se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 26"); - se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 27"); - se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 28"); - se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 29"); - se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 30"); - se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 31"); - se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 32"); - se = st.getEndingState("unlocked", "enabled", "null", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 33"); - se = st.getEndingState("unlocked", "enabled", "failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 34"); - se = st.getEndingState("unlocked", "enabled", "failed", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 35"); - se = st.getEndingState("unlocked", "enabled", "failed", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 36"); - se = st.getEndingState("unlocked", "enabled", "failed", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 37"); - se = st.getEndingState("unlocked", "enabled", "failed", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 38"); - se = st.getEndingState("unlocked", "enabled", "failed", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 39"); - se = st.getEndingState("unlocked", "enabled", "failed", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 40"); - se = st.getEndingState("unlocked", "enabled", "failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 41"); - se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 42"); - se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 43"); - se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 44"); - se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 45"); - se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 46"); - se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 47"); - se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 48"); - se = st.getEndingState("unlocked", "enabled", "failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 49"); - se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 50"); - se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 51"); - se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 52"); - se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 53"); - se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 54"); - se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 55"); - se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 56"); - se = st.getEndingState("unlocked", "enabled", "failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 57"); - se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 58"); - se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 59"); - se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 60"); - se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 61"); - se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 62"); - se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 63"); - se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 64"); - se = st.getEndingState("unlocked", "enabled", "failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 65"); - se = st.getEndingState("unlocked", "enabled", "dependency", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 66"); - se = st.getEndingState("unlocked", "enabled", "dependency", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 67"); - se = st.getEndingState("unlocked", "enabled", "dependency", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 68"); - se = st.getEndingState("unlocked", "enabled", "dependency", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 69"); - se = st.getEndingState("unlocked", "enabled", "dependency", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 70"); - se = st.getEndingState("unlocked", "enabled", "dependency", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 71"); - se = st.getEndingState("unlocked", "enabled", "dependency", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 72"); - se = st.getEndingState("unlocked", "enabled", "dependency", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 73"); - se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 74"); - se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 75"); - se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 76"); - se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 77"); - se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 78"); - se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 79"); - se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 80"); - se = st.getEndingState("unlocked", "enabled", "dependency", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 81"); - se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 82"); - se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 83"); - se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 84"); - se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 85"); - se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 86"); - se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 87"); - se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 88"); - se = st.getEndingState("unlocked", "enabled", "dependency", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 89"); - se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 90"); - se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 91"); - se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 92"); - se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 93"); - se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 94"); - se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 95"); - se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 96"); - se = st.getEndingState("unlocked", "enabled", "dependency", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 97"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 98"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 99"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 100"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 101"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 102"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 103"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 104"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 105"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 106"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 107"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 108"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 109"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 110"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 111"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 112"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 113"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 114"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 115"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 116"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 117"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 118"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 119"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 120"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 121"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 122"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 123"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 124"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 125"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 126"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 127"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 128"); - se = st.getEndingState("unlocked", "enabled", "dependency,failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 129"); - se = st.getEndingState("unlocked", "disabled", "null", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 130"); - se = st.getEndingState("unlocked", "disabled", "null", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 131"); - se = st.getEndingState("unlocked", "disabled", "null", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 132"); - se = st.getEndingState("unlocked", "disabled", "null", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 133"); - se = st.getEndingState("unlocked", "disabled", "null", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 134"); - se = st.getEndingState("unlocked", "disabled", "null", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 135"); - se = st.getEndingState("unlocked", "disabled", "null", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 136"); - se = st.getEndingState("unlocked", "disabled", "null", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 137"); - se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 138"); - se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 139"); - se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 140"); - se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 141"); - se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 142"); - se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 143"); - se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 144"); - se = st.getEndingState("unlocked", "disabled", "null", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 145"); - se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 146"); - se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 147"); - se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 148"); - se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 149"); - se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 150"); - se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 151"); - se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 152"); - se = st.getEndingState("unlocked", "disabled", "null", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 153"); - se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 154"); - se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 155"); - se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 156"); - se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 157"); - se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 158"); - se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 159"); - se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 160"); - se = st.getEndingState("unlocked", "disabled", "null", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 161"); - se = st.getEndingState("unlocked", "disabled", "failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 162"); - se = st.getEndingState("unlocked", "disabled", "failed", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 163"); - se = st.getEndingState("unlocked", "disabled", "failed", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 164"); - se = st.getEndingState("unlocked", "disabled", "failed", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 165"); - se = st.getEndingState("unlocked", "disabled", "failed", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 166"); - se = st.getEndingState("unlocked", "disabled", "failed", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 167"); - se = st.getEndingState("unlocked", "disabled", "failed", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 168"); - se = st.getEndingState("unlocked", "disabled", "failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 169"); - se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 170"); - se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 171"); - se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 172"); - se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 173"); - se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 174"); - se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 175"); - se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 176"); - se = st.getEndingState("unlocked", "disabled", "failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 177"); - se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 178"); - se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 179"); - se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 180"); - se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 181"); - se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 182"); - se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 183"); - se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 184"); - se = st.getEndingState("unlocked", "disabled", "failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 185"); - se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 186"); - se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 187"); - se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 188"); - se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 189"); - se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 190"); - se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 191"); - se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 192"); - se = st.getEndingState("unlocked", "disabled", "failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 193"); - se = st.getEndingState("unlocked", "disabled", "dependency", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 194"); - se = st.getEndingState("unlocked", "disabled", "dependency", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 195"); - se = st.getEndingState("unlocked", "disabled", "dependency", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 196"); - se = st.getEndingState("unlocked", "disabled", "dependency", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 197"); - se = st.getEndingState("unlocked", "disabled", "dependency", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 198"); - se = st.getEndingState("unlocked", "disabled", "dependency", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 199"); - se = st.getEndingState("unlocked", "disabled", "dependency", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 200"); - se = st.getEndingState("unlocked", "disabled", "dependency", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 201"); - se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 202"); - se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 203"); - se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 204"); - se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 205"); - se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 206"); - se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 207"); - se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 208"); - se = st.getEndingState("unlocked", "disabled", "dependency", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 209"); - se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 210"); - se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 211"); - se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 212"); - se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 213"); - se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 214"); - se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 215"); - se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 216"); - se = st.getEndingState("unlocked", "disabled", "dependency", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 217"); - se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 218"); - se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 219"); - se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 220"); - se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 221"); - se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 222"); - se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 223"); - se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 224"); - se = st.getEndingState("unlocked", "disabled", "dependency", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 225"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 226"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 227"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 228"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 229"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 230"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 231"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 232"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 233"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 234"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 235"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 236"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 237"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 238"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 239"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 240"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 241"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 242"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 243"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 244"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 245"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 246"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 247"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 248"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 249"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 250"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 251"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 252"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 253"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 254"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 255"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 256"); - se = st.getEndingState("unlocked", "disabled", "dependency,failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 257"); - se = st.getEndingState("locked", "enabled", "null", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 258"); - se = st.getEndingState("locked", "enabled", "null", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 259"); - se = st.getEndingState("locked", "enabled", "null", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 260"); - se = st.getEndingState("locked", "enabled", "null", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 261"); - se = st.getEndingState("locked", "enabled", "null", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 262"); - se = st.getEndingState("locked", "enabled", "null", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 263"); - se = st.getEndingState("locked", "enabled", "null", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 264"); - se = st.getEndingState("locked", "enabled", "null", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 265"); - se = st.getEndingState("locked", "enabled", "null", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 266"); - se = st.getEndingState("locked", "enabled", "null", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 267"); - se = st.getEndingState("locked", "enabled", "null", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 268"); - se = st.getEndingState("locked", "enabled", "null", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 269"); - se = st.getEndingState("locked", "enabled", "null", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 270"); - se = st.getEndingState("locked", "enabled", "null", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 271"); - se = st.getEndingState("locked", "enabled", "null", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 272"); - se = st.getEndingState("locked", "enabled", "null", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 273"); - se = st.getEndingState("locked", "enabled", "null", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 274"); - se = st.getEndingState("locked", "enabled", "null", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 275"); - se = st.getEndingState("locked", "enabled", "null", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 276"); - se = st.getEndingState("locked", "enabled", "null", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 277"); - se = st.getEndingState("locked", "enabled", "null", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 278"); - se = st.getEndingState("locked", "enabled", "null", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 279"); - se = st.getEndingState("locked", "enabled", "null", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 280"); - se = st.getEndingState("locked", "enabled", "null", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 281"); - se = st.getEndingState("locked", "enabled", "null", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 282"); - se = st.getEndingState("locked", "enabled", "null", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 283"); - se = st.getEndingState("locked", "enabled", "null", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 284"); - se = st.getEndingState("locked", "enabled", "null", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 285"); - se = st.getEndingState("locked", "enabled", "null", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 286"); - se = st.getEndingState("locked", "enabled", "null", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 287"); - se = st.getEndingState("locked", "enabled", "null", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 288"); - se = st.getEndingState("locked", "enabled", "null", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 289"); - se = st.getEndingState("locked", "enabled", "failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 290"); - se = st.getEndingState("locked", "enabled", "failed", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 291"); - se = st.getEndingState("locked", "enabled", "failed", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 292"); - se = st.getEndingState("locked", "enabled", "failed", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 293"); - se = st.getEndingState("locked", "enabled", "failed", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 294"); - se = st.getEndingState("locked", "enabled", "failed", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 295"); - se = st.getEndingState("locked", "enabled", "failed", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 296"); - se = st.getEndingState("locked", "enabled", "failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 297"); - se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 298"); - se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 299"); - se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 300"); - se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 301"); - se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 302"); - se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 303"); - se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 304"); - se = st.getEndingState("locked", "enabled", "failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 305"); - se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 306"); - se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 307"); - se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 308"); - se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 309"); - se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 310"); - se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 311"); - se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 312"); - se = st.getEndingState("locked", "enabled", "failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 313"); - se = st.getEndingState("locked", "enabled", "failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 314"); - se = st.getEndingState("locked", "enabled", "failed", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 315"); - se = st.getEndingState("locked", "enabled", "failed", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 316"); - se = st.getEndingState("locked", "enabled", "failed", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 317"); - se = st.getEndingState("locked", "enabled", "failed", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 318"); - se = st.getEndingState("locked", "enabled", "failed", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 319"); - se = st.getEndingState("locked", "enabled", "failed", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 320"); - se = st.getEndingState("locked", "enabled", "failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 321"); - se = st.getEndingState("locked", "enabled", "dependency", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 322"); - se = st.getEndingState("locked", "enabled", "dependency", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 323"); - se = st.getEndingState("locked", "enabled", "dependency", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 324"); - se = st.getEndingState("locked", "enabled", "dependency", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 325"); - se = st.getEndingState("locked", "enabled", "dependency", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 326"); - se = st.getEndingState("locked", "enabled", "dependency", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 327"); - se = st.getEndingState("locked", "enabled", "dependency", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 328"); - se = st.getEndingState("locked", "enabled", "dependency", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 329"); - se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 330"); - se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 331"); - se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 332"); - se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 333"); - se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 334"); - se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 335"); - se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 336"); - se = st.getEndingState("locked", "enabled", "dependency", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 337"); - se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 338"); - se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 339"); - se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 340"); - se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 341"); - se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 342"); - se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 343"); - se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 344"); - se = st.getEndingState("locked", "enabled", "dependency", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 345"); - se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 346"); - se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 347"); - se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 348"); - se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 349"); - se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 350"); - se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 351"); - se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 352"); - se = st.getEndingState("locked", "enabled", "dependency", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 353"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 354"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 355"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 356"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 357"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 358"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 359"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 360"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 361"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 362"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 363"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 364"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 365"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 366"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 367"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 368"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 369"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 370"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 371"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 372"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 373"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 374"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 375"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 376"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 377"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 378"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 379"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 380"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 381"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 382"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 383"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 384"); - se = st.getEndingState("locked", "enabled", "dependency,failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 385"); - se = st.getEndingState("locked", "disabled", "null", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 386"); - se = st.getEndingState("locked", "disabled", "null", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 387"); - se = st.getEndingState("locked", "disabled", "null", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 388"); - se = st.getEndingState("locked", "disabled", "null", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 389"); - se = st.getEndingState("locked", "disabled", "null", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 390"); - se = st.getEndingState("locked", "disabled", "null", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 391"); - se = st.getEndingState("locked", "disabled", "null", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 392"); - se = st.getEndingState("locked", "disabled", "null", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 393"); - se = st.getEndingState("locked", "disabled", "null", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 394"); - se = st.getEndingState("locked", "disabled", "null", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 395"); - se = st.getEndingState("locked", "disabled", "null", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 396"); - se = st.getEndingState("locked", "disabled", "null", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 397"); - se = st.getEndingState("locked", "disabled", "null", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 398"); - se = st.getEndingState("locked", "disabled", "null", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 399"); - se = st.getEndingState("locked", "disabled", "null", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 400"); - se = st.getEndingState("locked", "disabled", "null", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 401"); - se = st.getEndingState("locked", "disabled", "null", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 402"); - se = st.getEndingState("locked", "disabled", "null", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 403"); - se = st.getEndingState("locked", "disabled", "null", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 404"); - se = st.getEndingState("locked", "disabled", "null", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 405"); - se = st.getEndingState("locked", "disabled", "null", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 406"); - se = st.getEndingState("locked", "disabled", "null", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 407"); - se = st.getEndingState("locked", "disabled", "null", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 408"); - se = st.getEndingState("locked", "disabled", "null", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 409"); - se = st.getEndingState("locked", "disabled", "null", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 410"); - se = st.getEndingState("locked", "disabled", "null", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 411"); - se = st.getEndingState("locked", "disabled", "null", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 412"); - se = st.getEndingState("locked", "disabled", "null", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 413"); - se = st.getEndingState("locked", "disabled", "null", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 414"); - se = st.getEndingState("locked", "disabled", "null", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 415"); - se = st.getEndingState("locked", "disabled", "null", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 416"); - se = st.getEndingState("locked", "disabled", "null", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 417"); - se = st.getEndingState("locked", "disabled", "failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 418"); - se = st.getEndingState("locked", "disabled", "failed", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 419"); - se = st.getEndingState("locked", "disabled", "failed", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 420"); - se = st.getEndingState("locked", "disabled", "failed", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 421"); - se = st.getEndingState("locked", "disabled", "failed", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 422"); - se = st.getEndingState("locked", "disabled", "failed", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 423"); - se = st.getEndingState("locked", "disabled", "failed", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 424"); - se = st.getEndingState("locked", "disabled", "failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 425"); - se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 426"); - se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 427"); - se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 428"); - se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 429"); - se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 430"); - se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 431"); - se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 432"); - se = st.getEndingState("locked", "disabled", "failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 433"); - se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 434"); - se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 435"); - se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 436"); - se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 437"); - se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 438"); - se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 439"); - se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 440"); - se = st.getEndingState("locked", "disabled", "failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 441"); - se = st.getEndingState("locked", "disabled", "failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 442"); - se = st.getEndingState("locked", "disabled", "failed", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 443"); - se = st.getEndingState("locked", "disabled", "failed", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 444"); - se = st.getEndingState("locked", "disabled", "failed", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 445"); - se = st.getEndingState("locked", "disabled", "failed", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 446"); - se = st.getEndingState("locked", "disabled", "failed", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 447"); - se = st.getEndingState("locked", "disabled", "failed", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 448"); - se = st.getEndingState("locked", "disabled", "failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 449"); - se = st.getEndingState("locked", "disabled", "dependency", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 450"); - se = st.getEndingState("locked", "disabled", "dependency", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 451"); - se = st.getEndingState("locked", "disabled", "dependency", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 452"); - se = st.getEndingState("locked", "disabled", "dependency", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 453"); - se = st.getEndingState("locked", "disabled", "dependency", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 454"); - se = st.getEndingState("locked", "disabled", "dependency", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 455"); - se = st.getEndingState("locked", "disabled", "dependency", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 456"); - se = st.getEndingState("locked", "disabled", "dependency", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 457"); - se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 458"); - se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 459"); - se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 460"); - se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 461"); - se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 462"); - se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 463"); - se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 464"); - se = st.getEndingState("locked", "disabled", "dependency", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 465"); - se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 466"); - se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 467"); - se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 468"); - se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 469"); - se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 470"); - se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 471"); - se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 472"); - se = st.getEndingState("locked", "disabled", "dependency", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 473"); - se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 474"); - se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 475"); - se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 476"); - se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 477"); - se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 478"); - se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 479"); - se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 480"); - se = st.getEndingState("locked", "disabled", "dependency", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 481"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 482"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 483"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 484"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 485"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 486"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 487"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 488"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "null", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 489"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 490"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 491"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 492"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 493"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 494"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 495"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 496"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "coldstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 497"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 498"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 499"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 500"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 501"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 502"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 503"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 504"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "hotstandby", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 505"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 506"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "unlock"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 507"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "disableFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 508"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "enableNotFailed"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 509"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "disableDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 510"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "enableNoDependency"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 511"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "promote"); - if (se != null) displayEndingState(se); - - logger.info("??? StateTransition testcase 512"); - se = st.getEndingState("locked", "disabled", "dependency,failed", "providingservice", "demote"); - if (se != null) displayEndingState(se); - - } catch (Exception ex) { - logger.error("EndingState NOT found"); - throw new Exception("EndingState NOT found. " + ex); - } - - //if (emf.isOpen()) { - //emf.close(); - //} - } catch(Exception ex) { - logger.error("Exception: " + ex.toString()); - throw new Exception("Failure getting ending state. " + ex ); - } finally { - if (emf != null && emf.isOpen()) { - emf.close(); - } - } - - logger.info("\n\nStateTransitionTest: Exit\n\n"); - } - - private void displayEndingState(StateElement se) - { - String endingStandbyStatus = se.getEndingStandbyStatus(); - if (endingStandbyStatus != null) { - endingStandbyStatus.replace(".", ","); - } - logger.info("EndingAdminState = [" + se.getEndingAdminState() +"]"); - logger.info("EndingOpState = [" + se.getEndingOpState() +"]"); - logger.info("EndingAvailStatus = [" + se.getEndingAvailStatus() +"]"); - logger.info("EndingStandbyStatus= [" + endingStandbyStatus +"]"); - logger.info("Exception = [" + se.getException() +"]"); - } -}
\ No newline at end of file |