diff options
author | 2018-03-07 18:17:22 -0800 | |
---|---|---|
committer | 2018-03-08 09:17:48 -0800 | |
commit | 327b17ab250b4c17cf3f91f5e4cd9bffd89f3d1e (patch) | |
tree | 0d943226962ae31c0bf2fd0696e91c6bb41d099c /packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/jmeter/JMeterITCase.java | |
parent | dee036198ee09d71bfdd50247c1d23a7f472df87 (diff) |
Reduce log noise/warnings format to conventions
Reduce build log warnings by formatting tests
to ONAP code conventions (removing tabs etc.)
Issue-ID: SO-368
Change-Id: I48c6d359b83617aebeb79db4e30c1d72d31f7eec
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
Diffstat (limited to 'packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/jmeter/JMeterITCase.java')
-rw-r--r-- | packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/jmeter/JMeterITCase.java | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/jmeter/JMeterITCase.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/jmeter/JMeterITCase.java index 0bf9eac915..72a957f45a 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/jmeter/JMeterITCase.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/jmeter/JMeterITCase.java @@ -50,80 +50,80 @@ import org.openecomp.mso.global_tests.ArquillianPackagerForITCases; @RunWith(Arquillian.class) public class JMeterITCase { - - @Deployment(name="mso-api-handler-infra",testable=false) - public static Archive<?> createMsoApiHandlerInfraWarDeployment () { - System.out.println("Deploying ApiHandler Infra WAR on default server"); - return ArquillianPackagerForITCases.createPackageFromExistingOne("../../mso-api-handlers/mso-api-handler-infra/target/", "mso-api-handler-infra*.war", "mso-api-handler-infra.war"); - } - - @Deployment(name="mso-vnf-adapter",testable=false) - public static Archive<?> createMsoVnfAdapterWarDeployment () { - System.out.println("Deploying VNF Adapter WAR on default server"); - return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-vnf-adapter/target/", "mso-vnf-adapter*.war", "mso-vnf-adapter.war"); - } - - @Deployment(name="mso-tenant-adapter",testable=false) - public static Archive<?> createMsoTenantAdapterWarDeployment () { - System.out.println("Deploying Tenant Adapter WAR on default server"); - return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-tenant-adapter/target/", "mso-tenant-adapter*.war", "mso-tenant-adapter.war"); - } - - @Deployment(name="mso-sdnc-adapter",testable=false) - public static Archive<?> createMsoSdncAdapterWarDeployment () { - System.out.println("Deploying SDNC Adapter WAR on default server"); - return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-sdnc-adapter/target/", "mso-sdnc-adapter*.war", "mso-sdnc-adapter.war"); - } - - @Deployment(name="mso-network-adapter",testable=false) - public static Archive<?> createMsoNetworkAdapterWarDeployment () { - System.out.println("Deploying Network Adapter WAR on default server"); - return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-network-adapter/target/", "mso-network-adapter*.war", "mso-network-adapter.war"); - } - - @Deployment(name="mso-requests-db-adapter",testable=false) - public static Archive<?> createMsoRequestsDbAdapterWarDeployment () { - System.out.println("Deploying Requests DB Adapter WAR on default server"); - return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-requests-db-adapter/target/", "mso-requests-db-adapter*.war", "mso-requests-db-adapter.war"); - } - - @Deployment(name="asdc-controller",testable=true) - public static Archive<?> createAsdcControllerWarDeployment () { - System.out.println("Deploying ASDC Controller WAR with additional resources on default server"); - - WebArchive warArchive = (WebArchive)ArquillianPackagerForITCases.createPackageFromExistingOne("../../asdc-controller/target/", "asdc-controller*.war", "asdc-controller.war"); - - // Add the current test class - JavaArchive testclasses = ShrinkWrap.create (JavaArchive.class, "testClasses.jar"); - testclasses.addClasses(JMeterITCase.class); - - warArchive.addAsLibraries(testclasses); - - // BE CAREFUL a settings.xml file must be located in ${home.user}/.m2/settings.xml - warArchive.addAsLibraries(Maven.resolver() - .resolve("org.mockito:mockito-all:1.10.19") - .withoutTransitivity () - .asFile ()); - - // Take one war randomly to make arquilian happy - - Testable.archiveToTest(warArchive); - - - return warArchive; - } - - + + @Deployment(name = "mso-api-handler-infra", testable = false) + public static Archive<?> createMsoApiHandlerInfraWarDeployment() { + System.out.println("Deploying ApiHandler Infra WAR on default server"); + return ArquillianPackagerForITCases.createPackageFromExistingOne("../../mso-api-handlers/mso-api-handler-infra/target/", "mso-api-handler-infra*.war", "mso-api-handler-infra.war"); + } + + @Deployment(name = "mso-vnf-adapter", testable = false) + public static Archive<?> createMsoVnfAdapterWarDeployment() { + System.out.println("Deploying VNF Adapter WAR on default server"); + return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-vnf-adapter/target/", "mso-vnf-adapter*.war", "mso-vnf-adapter.war"); + } + + @Deployment(name = "mso-tenant-adapter", testable = false) + public static Archive<?> createMsoTenantAdapterWarDeployment() { + System.out.println("Deploying Tenant Adapter WAR on default server"); + return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-tenant-adapter/target/", "mso-tenant-adapter*.war", "mso-tenant-adapter.war"); + } + + @Deployment(name = "mso-sdnc-adapter", testable = false) + public static Archive<?> createMsoSdncAdapterWarDeployment() { + System.out.println("Deploying SDNC Adapter WAR on default server"); + return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-sdnc-adapter/target/", "mso-sdnc-adapter*.war", "mso-sdnc-adapter.war"); + } + + @Deployment(name = "mso-network-adapter", testable = false) + public static Archive<?> createMsoNetworkAdapterWarDeployment() { + System.out.println("Deploying Network Adapter WAR on default server"); + return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-network-adapter/target/", "mso-network-adapter*.war", "mso-network-adapter.war"); + } + + @Deployment(name = "mso-requests-db-adapter", testable = false) + public static Archive<?> createMsoRequestsDbAdapterWarDeployment() { + System.out.println("Deploying Requests DB Adapter WAR on default server"); + return ArquillianPackagerForITCases.createPackageFromExistingOne("../../adapters/mso-requests-db-adapter/target/", "mso-requests-db-adapter*.war", "mso-requests-db-adapter.war"); + } + + @Deployment(name = "asdc-controller", testable = true) + public static Archive<?> createAsdcControllerWarDeployment() { + System.out.println("Deploying ASDC Controller WAR with additional resources on default server"); + + WebArchive warArchive = (WebArchive) ArquillianPackagerForITCases.createPackageFromExistingOne("../../asdc-controller/target/", "asdc-controller*.war", "asdc-controller.war"); + + // Add the current test class + JavaArchive testclasses = ShrinkWrap.create(JavaArchive.class, "testClasses.jar"); + testclasses.addClasses(JMeterITCase.class); + + warArchive.addAsLibraries(testclasses); + + // BE CAREFUL a settings.xml file must be located in ${home.user}/.m2/settings.xml + warArchive.addAsLibraries(Maven.resolver() + .resolve("org.mockito:mockito-all:1.10.19") + .withoutTransitivity() + .asFile()); + + // Take one war randomly to make arquilian happy + + Testable.archiveToTest(warArchive); + + + return warArchive; + } + + @BeforeClass - public static void waitBeforeStart () throws InterruptedException { - System.out.println ("Executing " + JMeterITCase.class.getName ()); - + public static void waitBeforeStart() throws InterruptedException { + System.out.println("Executing " + JMeterITCase.class.getName()); + } @Test - @RunAsClient() - public void testJMeter() throws IOException { - // JMeter Engine + @RunAsClient() + public void testJMeter() throws IOException { + // JMeter Engine StandardJMeterEngine jmeter = new StandardJMeterEngine(); @@ -132,12 +132,12 @@ public class JMeterITCase { JMeterUtils.setJMeterHome("/tmp/apache-jmeter-2.13"); JMeterUtils.initLogging();// you can comment this line out to see extra log messages of i.e. DEBUG level JMeterUtils.initLocale(); - + // Initialize JMeter SaveService SaveService.loadProperties(); // Load existing .jmx Test Plan - + FileInputStream in = new FileInputStream("./src/test/resources/JMeter/MSO-Perf.jmx"); HashTree testPlanTree = SaveService.loadTree(in); testPlanTree.getTree("test variables"); @@ -146,21 +146,21 @@ public class JMeterITCase { // Run JMeter Test jmeter.configure(testPlanTree); jmeter.run(); - } + } @AfterClass public static void afterArquillianTest() { - try { - Files.move (Paths.get ("./jmeter.log"), - Paths.get ("./target/surefire-reports/jmeter.log"), - StandardCopyOption.REPLACE_EXISTING); - + try { + Files.move(Paths.get("./jmeter.log"), + Paths.get("./target/surefire-reports/jmeter.log"), + StandardCopyOption.REPLACE_EXISTING); + /* Files.move (Paths.get ("./mso-perf.jtl"), Paths.get ("./target/surefire-reports/mso-perf.log"), StandardCopyOption.REPLACE_EXISTING);*/ - } catch (IOException e) { - e.printStackTrace(); - } + } catch (IOException e) { + e.printStackTrace(); + } } } |