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/logging/LogsCheckerITCase.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/logging/LogsCheckerITCase.java')
-rw-r--r-- | packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java | 100 |
1 files changed, 49 insertions, 51 deletions
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java index bae9af5cc1..56bea0f6b3 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/logging/LogsCheckerITCase.java @@ -47,62 +47,60 @@ import org.openecomp.mso.global_tests.ArquillianPackagerForITCases; @RunWith(Arquillian.class) public class LogsCheckerITCase { - + @BeforeClass - public static void waitBeforeStart () throws InterruptedException { - System.out.println ("Executing " + LogsCheckerITCase.class.getName ()); - + public static void waitBeforeStart() throws InterruptedException { + System.out.println("Executing " + LogsCheckerITCase.class.getName()); + + } + + @Deployment(name = "log-check", testable = true) + public static Archive<?> createAsdcControllerWarDeployment() throws Exception { + // Any war could be used here, we just take that one randomly + // Be careful some WAR does not work when being injected in JBOSS, probably due to Servlet conflict + System.out.println("Deploying ASDC Controller WAR for log checker"); + WebArchive warArchive = (WebArchive) ArquillianPackagerForITCases.createPackageFromExistingOne("../../asdc-controller/target/", "asdc-controller*.war", "asdc-controller.war"); + + JavaArchive testclasses = ShrinkWrap.create(JavaArchive.class, "testClasses.jar"); + + testclasses.addPackage("org.openecomp.mso.filesearching"); + + warArchive.addAsLibraries(testclasses); + + Testable.archiveToTest(warArchive); + return warArchive; + } + + @Before + public void beforeEachTest() { + LogFileSearching.initFile("/tmp/mso-log-checker.log"); + } + + @After + public void afterEachTest() { + LogFileSearching.closeFile(); } - - @Deployment(name="log-check",testable=true) - public static Archive<?> createAsdcControllerWarDeployment () throws Exception { - // Any war could be used here, we just take that one randomly - // Be careful some WAR does not work when being injected in JBOSS, probably due to Servlet conflict - System.out.println("Deploying ASDC Controller WAR for log checker"); - WebArchive warArchive = (WebArchive)ArquillianPackagerForITCases.createPackageFromExistingOne("../../asdc-controller/target/", "asdc-controller*.war", "asdc-controller.war"); - - JavaArchive testclasses = ShrinkWrap.create (JavaArchive.class, "testClasses.jar"); - - testclasses.addPackage("org.openecomp.mso.filesearching"); - - warArchive.addAsLibraries(testclasses); - - Testable.archiveToTest(warArchive); - return warArchive; - } - - @Before - public void beforeEachTest() { - LogFileSearching.initFile("/tmp/mso-log-checker.log"); - } - - @After - public void afterEachTest() { - LogFileSearching.closeFile(); - } - + @Test - @OperateOnDeployment("log-check") - public void testJbossServerLog() throws IOException { - - File serverLogs = new File("/opt/jboss/standalone/log"); - //File serverLogs = new File("/tmp/jbosslogs/server.log"); - - assertFalse(LogFileSearching.searchInDirectoryForCommonIssues(null, serverLogs)); - + @OperateOnDeployment("log-check") + public void testJbossServerLog() throws IOException { + + File serverLogs = new File("/opt/jboss/standalone/log"); + //File serverLogs = new File("/tmp/jbosslogs/server.log"); + + assertFalse(LogFileSearching.searchInDirectoryForCommonIssues(null, serverLogs)); + } - + @Test @OperateOnDeployment("log-check") - public void testMSOLog() throws IOException { - //File serverLogs = new File("/opt/app/mso/jboss-eap-6.2/standalone/log/server.log"); - File msoLogs = new File("/var/log/ecomp/MSO"); - - assertFalse(LogFileSearching.searchInDirectoryForCommonIssues(null, msoLogs)); - + public void testMSOLog() throws IOException { + //File serverLogs = new File("/opt/app/mso/jboss-eap-6.2/standalone/log/server.log"); + File msoLogs = new File("/var/log/ecomp/MSO"); + + assertFalse(LogFileSearching.searchInDirectoryForCommonIssues(null, msoLogs)); + } - - - - + + } |