summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/log4j.xml65
-rw-r--r--etc/log4j2.xml62
-rw-r--r--etc/log4j2_template.xml60
-rw-r--r--etc/log4j_template.xml63
-rw-r--r--pom.xml1222
-rw-r--r--src/main/swm/common/localize.sh8
-rw-r--r--src/test/java/org/onap/dmaap/mr/apiServer/metrics/cambria/JUnitTestSuite.java25
-rw-r--r--src/test/java/org/onap/dmaap/mr/apiServer/metrics/cambria/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/JUnitTestSuite.java27
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/backends/kafka/JUnitTestSuite.java27
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/backends/kafka/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/backends/memory/JUnitTestSuite.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/backends/memory/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/beans/JUnitTestSuite.java42
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/beans/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/exception/JUnitTestSuite.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/exception/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/listener/JUnitTestSuite.java26
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/listener/TestRunner.java30
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/metabroker/JUnitTestSuite.java26
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/metabroker/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/JUnitTestSuite.java26
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/impl/JUnitTestSuite.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/impl/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/resources/JUnitTestSuite.java26
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/resources/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/resources/streamReaders/JUnitTestSuite.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/resources/streamReaders/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/security/JUnitTestSuite.java26
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/security/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/security/impl/JUnitTestSuite.java26
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/security/impl/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/service/impl/JUnitTestSuite.java30
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/service/impl/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/transaction/JUnitTestSuite.java26
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/transaction/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/transaction/impl/JUnitTestSuite.java26
-rw-r--r--src/test/java/org/onap/dmaap/mr/cambria/transaction/impl/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/filter/JUnitTestSuite.java24
-rw-r--r--src/test/java/org/onap/dmaap/mr/filter/TestRunner.java28
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/dme2/DME2AdminTest.java227
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/dme2/DME2ApiKeyTest.java193
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/dme2/DME2ConsumerFilterTest.java116
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/dme2/DME2ConsumerTest.java113
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/dme2/DME2MetricsTest.java197
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/dme2/DME2ProducerTest.java132
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/dme2/DME2TopicTest.java926
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/dme2/JUnitTestSuite.java26
-rw-r--r--src/test/java/org/onap/dmaap/mr/test/dme2/TestRunner.java26
51 files changed, 2135 insertions, 2302 deletions
diff --git a/etc/log4j.xml b/etc/log4j.xml
deleted file mode 100644
index 5a15348..0000000
--- a/etc/log4j.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ============LICENSE_START=======================================================
- org.onap.dmaap
- ================================================================================
- Copyright © 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=========================================================
-
- ECOMP is a trademark and service mark of AT&T Intellectual Property.
-
- -->
-
-<!DOCTYPE log4j:configuration PUBLIC
- "-//APACHE//DTD LOG4J 1.2//EN" "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
- <!-- available for console output, not generally used in deployment -->
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <param name="threshold" value="INFO" />
- <layout class="org.apache.log4j.EnhancedPatternLayout">
- <param name="ConversionPattern" value="[%d{ISO8601}{GMT+0} GMT][%-10t][%-5p]%m%n" />
- </layout>
- </appender>
-
- <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
- <param name="threshold" value="INFO" />
- <param name="File" value="./logs/cambria.log" /> <!-- use local dir by default; prod setup can overwrite -->
- <param name="MaxFileSize" value="128MB"/>
- <param name="MaxBackupIndex" value="10"/>
- <layout class="org.apache.log4j.EnhancedPatternLayout">
- <param name="ConversionPattern" value="[%d{ISO8601}{GMT+0} GMT][%-10t][%-5p]%m%n" />
- </layout>
- </appender>
-
- <appender name="ECOMP_ERROR" class="org.apache.log4j.RollingFileAppender">
- <param name="threshold" value="INFO" />
- <param name="File" value="./logs/error.log" /> <!-- use local dir by default; prod setup can overwrite -->
- <param name="MaxFileSize" value="128MB"/>
- <param name="MaxBackupIndex" value="10"/>
- <layout class="org.apache.log4j.EnhancedPatternLayout">
- <param name="ConversionPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00:00|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{ipAddress}|%X{className}|%X{timer}|%m%n" />
- </layout>
- </appender>
- <!-- the other 3 ECOMP logs are omitted for this release -->
-
- <root>
- <level value="INFO" />
- <appender-ref ref="FILE" />
- <appender-ref ref="ECOMP_ERROR" />
- <appender-ref ref="CONSOLE" />
- </root>
-
-</log4j:configuration>
diff --git a/etc/log4j2.xml b/etc/log4j2.xml
new file mode 100644
index 0000000..0918f35
--- /dev/null
+++ b/etc/log4j2.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2021 Nordix Foundation.
+ ================================================================================
+ 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.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+ -->
+
+<Configuration status="WARN">
+ <Appenders>
+ <!-- Console Appender -->
+ <Console name="STDOUT" target="SYSTEM_OUT">
+ <PatternLayout pattern="[%d{ISO8601}{GMT+0} GMT][%-10t][%-5p]%m%n"/>
+ </Console>
+
+ <!-- Rolling File Appender -->
+ <RollingFile name="rollingFile">
+ <FileName>./logs/cambria.log</FileName>
+ <FilePattern>./logs/${date:yyyy-MM}/cambria-%d{yyyy-MM-dd}-%i.log</FilePattern>
+ <PatternLayout>
+ <Pattern>[%d{ISO8601}{GMT+0} GMT][%-10t][%-5p]%m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <SizeBasedTriggeringPolicy size="128 MB"/>
+ </Policies>
+ <DefaultRolloverStrategy max="10"/>
+ </RollingFile>
+
+ <!-- Rolling File Appender -->
+ <RollingFile name="rollingFile_ECOMP_ERROR">
+ <FileName>./logs/error.log</FileName>
+ <FilePattern>./logs/${date:yyyy-MM}/error-%d{yyyy-MM-dd}-%i.log</FilePattern>
+ <PatternLayout>
+ <Pattern>%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00:00|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{ipAddress}|%X{className}|%X{timer}|%m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <SizeBasedTriggeringPolicy size="128 MB"/>
+ </Policies>
+ <DefaultRolloverStrategy max="10"/>
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <Root level="info">
+ <AppenderRef ref="STDOUT"/>
+ <AppenderRef ref="rollingFile"/>
+ <AppenderRef ref="rollingFile_ECOMP_ERROR"/>
+ </Root>
+ </Loggers>
+</Configuration> \ No newline at end of file
diff --git a/etc/log4j2_template.xml b/etc/log4j2_template.xml
new file mode 100644
index 0000000..1c70479
--- /dev/null
+++ b/etc/log4j2_template.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2021 Nordix Foundation.
+ ================================================================================
+ 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.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+ -->
+
+<Configuration status="WARN">
+ <Appenders>
+ <!-- Console Appender -->
+ <Console name="STDOUT" target="SYSTEM_OUT">
+ <PatternLayout pattern="[%d{ISO8601}{GMT+0} GMT][%-10t][%-5p][%X{serverIp}]%m%n"/>
+ </Console>
+
+ <!-- Rolling File Appender -->
+ <RollingFile name="rollingFile">
+ <FileName>./${CAMBRIA_LOG_DIR}/cambria.log</FileName>
+ <FilePattern>./${CAMBRIA_LOG_DIR}/${date:yyyy-MM}/cambria-%d{yyyy-MM-dd}-%i.log</FilePattern>
+ <PatternLayout>
+ <Pattern>%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00:00|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{ipAddress}|%X{className}|%X{timer}|%m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <SizeBasedTriggeringPolicy size="128 MB"/>
+ </Policies>
+ <DefaultRolloverStrategy max="10"/>
+ </RollingFile>
+
+ <!-- Rolling File Appender -->
+ <RollingFile name="rollingFile_ECOMP_ERROR">
+ <FileName>./${CAMBRIA_LOG_DIR}/error.log</FileName>
+ <FilePattern>./${CAMBRIA_LOG_DIR}/${date:yyyy-MM}/error-%d{yyyy-MM-dd}-%i.log</FilePattern>
+ <PatternLayout>
+ <Pattern>%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00:00|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{ipAddress}|%X{className}|%X{timer}|%m%n</Pattern>
+ </PatternLayout>
+ <Policies>
+ <SizeBasedTriggeringPolicy size="128 MB"/>
+ </Policies>
+ <DefaultRolloverStrategy max="10"/>
+ </RollingFile>
+ </Appenders>
+ <Loggers>
+ <Root level="${CAMBRIA_LOG_THRESHOLD}">
+ <AppenderRef ref="rollingFile"/>
+ </Root>
+ </Loggers>
+</Configuration> \ No newline at end of file
diff --git a/etc/log4j_template.xml b/etc/log4j_template.xml
deleted file mode 100644
index 808a1bc..0000000
--- a/etc/log4j_template.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ============LICENSE_START=======================================================
- org.onap.dmaap
- ================================================================================
- Copyright © 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=========================================================
-
- ECOMP is a trademark and service mark of AT&T Intellectual Property.
-
- -->
-
-<!DOCTYPE log4j:configuration PUBLIC
- "-//APACHE//DTD LOG4J 1.2//EN" "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
- <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
- <param name="threshold" value="INFO" />
- <layout class="org.apache.log4j.EnhancedPatternLayout">
- <param name="ConversionPattern" value="[%d{ISO8601}{GMT+0} GMT][%-10t][%-5p][%X{serverIp}]%m%n" />
- </layout>
- </appender>
-
- <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
- <param name="threshold" value="${CAMBRIA_LOG_THRESHOLD}" />
- <param name="File" value="${CAMBRIA_LOG_DIR}/cambria.log" />
- <param name="MaxFileSize" value="128MB"/>
- <param name="MaxBackupIndex" value="10"/>
- <layout class="org.apache.log4j.EnhancedPatternLayout">
- <param name="ConversionPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00:00|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{ipAddress}|%X{className}|%X{timer}|%m%n" />
- </layout>
- </appender>
-
- <!-- The ECOMP error.log log -->
- <appender name="ECOMP_ERROR" class="org.apache.log4j.RollingFileAppender">
- <param name="threshold" value="INFO" />
- <param name="File" value="${CAMBRIA_LOG_DIR}/error.log" />
- <param name="MaxFileSize" value="128MB"/>
- <param name="MaxBackupIndex" value="10"/>
- <layout class="org.apache.log4j.EnhancedPatternLayout">
- <param name="ConversionPattern" value="%d{yyyy-MM-dd'T'HH:mm:ss}{GMT+0}+00:00|%X{requestId}|%X{serviceInstanceId}|%-10t|%X{serverName}|%X{serviceName}|%X{instanceUuid}|%p|%X{severity}|%X{serverIpAddress}|%X{server}|%X{ipAddress}|%X{className}|%X{timer}|%m%n" />
- </layout>
- </appender>
- <!-- the other 3 ECOMP logs are omitted for this release -->
-
- <root>
- <level value="${CAMBRIA_LOG_THRESHOLD}" />
- <appender-ref ref="FILE" />
- </root>
-
-</log4j:configuration>
diff --git a/pom.xml b/pom.xml
index 958e7c1..a9be689 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,632 +1,596 @@
-<!-- ============LICENSE_START=======================================================
- org.onap.dmaap ================================================================================
- Copyright © 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=========================================================
- ECOMP is a trademark and service mark of AT&T Intellectual Property. -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.onap.dmaap.messagerouter.msgrtr</groupId>
- <artifactId>msgrtr</artifactId>
- <version>1.1.22-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>dmaap-messagerouter-msgrtr</name>
- <description>Message Router - Restful interface built for kafka</description>
-
- <parent>
- <groupId>org.onap.oparent</groupId>
- <artifactId>oparent</artifactId>
- <version>2.1.0</version>
- </parent>
-
- <properties>
- <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
- <spring.version>3.2.18.RELEASE</spring.version>
- <cxf.version>3.0.4</cxf.version>
- <jstl.version>1.2</jstl.version>
- <maven.compiler.target>1.7</maven.compiler.target>
- <maven.compiler.source>1.7</maven.compiler.source>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
-
- <sonar.language>java</sonar.language>
+<!--
+ ============LICENSE_START==============================================
+ org.onap.dmaap
+ =======================================================================
+ Copyright © 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================================================
+ ECOMP is a trademark and service mark of AT&T Intellectual Property.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.onap.dmaap.messagerouter.msgrtr</groupId>
+ <artifactId>msgrtr</artifactId>
+ <version>1.1.22-SNAPSHOT</version>
+ <packaging>jar</packaging>
+ <name>dmaap-messagerouter-msgrtr</name>
+ <description>Message Router - Restful interface built for kafka</description>
+
+ <parent>
+ <groupId>org.onap.oparent</groupId>
+ <artifactId>oparent</artifactId>
+ <version>2.1.0</version>
+ </parent>
+
+ <properties>
+ <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+ <spring.version>3.2.18.RELEASE</spring.version>
+ <cxf.version>3.0.4</cxf.version>
+ <jstl.version>1.2</jstl.version>
+ <log4j.version>2.13.3</log4j.version>
+ <maven.compiler.target>1.7</maven.compiler.target>
+ <maven.compiler.source>1.7</maven.compiler.source>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+ <sonar.language>java</sonar.language>
<sonar.skip>false</sonar.skip>
- <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports</sonar.surefire.reportsPath>
- <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
+ <sonar.surefire.reportsPath>${project.build.directory}/surefire-reports
+ </sonar.surefire.reportsPath>
+ <sonar.coverage.jacoco.xmlReportPaths>
+ ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
+ </sonar.coverage.jacoco.xmlReportPaths>
<sonar.projectVersion>${project.version}</sonar.projectVersion>
- <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**</sonar.exclusions>
- <sitePath>/content/sites/site/org/onap/dmaap/messagerouter/msgrtr/${project.artifactId}/${project.version}</sitePath>
- <nexusproxy>https://nexus.onap.org</nexusproxy>
- </properties>
-
- <!-- Distribution management -->
- <!-- Currently all artifacts will be uploaded to att-public-group reposiotry
- on Maven Central -->
- <distributionManagement>
- <site>
- <id>ecomp-site</id>
- <url>dav:${nexusproxy}${sitePath}</url>
- </site>
- </distributionManagement>
-
- <!-- End Distribution management -->
-
- <licenses>
- <license>
- <name>Apache License Version 2.0</name>
- </license>
- </licenses>
-
- <developers>
- <developer>
- <name>Rajashree</name>
- <email></email>
- <organization>ATT</organization>
- <organizationUrl>www.att.com</organizationUrl>
- </developer>
- <developer>
- <name>Ramkumar</name>
- <email></email>
- <organization>ATT</organization>
- <organizationUrl>www.att.com</organizationUrl>
- </developer>
- </developers>
-
- <dependencies>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2.2</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <version>1.2.0</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>1.2.0</version>
- </dependency>
- <!-- <dependency> <groupId>commons-beanutils</groupId> <artifactId>commons-beanutils</artifactId>
- <version>1.9.2</version> <exclusions> We have JCL-over-SLF4J instead. <exclusion>
- <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId>
- </exclusion> </exclusions> </dependency> -->
- <dependency>
- <groupId>org.grails</groupId>
- <artifactId>grails-web</artifactId>
- <version>2.5.4</version>
- <exclusions>
- <exclusion>
- <groupId>org.grails</groupId>
- <artifactId>grails-web-jsp</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.grails</groupId>
- <artifactId>grails-bootstrap</artifactId>
- <version>2.5.4</version>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <artifactId>ant</artifactId>
- <groupId>org.apache.ant</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jna</artifactId>
- <groupId>net.java.dev.jna</groupId>
- </exclusion>
- <exclusion>
- <artifactId>ant-trax</artifactId>
- <groupId>org.apache.ant</groupId>
- </exclusion>
- <exclusion>
- <artifactId>gant_groovy1.8</artifactId>
- <groupId>org.codehaus.gant</groupId>
- </exclusion>
- <exclusion>
- <artifactId>ant-launcher</artifactId>
- <groupId>org.apache.ant</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jline</artifactId>
- <groupId>jline</groupId>
- </exclusion>
- <exclusion>
- <artifactId>ivy</artifactId>
- <groupId>org.apache.ivy</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jansi</artifactId>
- <groupId>org.fusesource.jansi</groupId>
- </exclusion>
- <exclusion>
- <artifactId>commons-logging</artifactId>
- <groupId>commons-logging</groupId>
- </exclusion>
- <exclusion>
- <artifactId>ant-junit</artifactId>
- <groupId>org.apache.ant</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <version>${spring.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.codehaus.groovy</groupId>
- <artifactId>groovy-all</artifactId>
- <version>2.4.8</version>
- <scope>compile</scope>
- <exclusions>
- <exclusion>
- <artifactId>jline</artifactId>
- <groupId>jline</groupId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>commons-fileupload</groupId>
- <artifactId>commons-fileupload</artifactId>
- <version>1.4</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.11</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.att.aft</groupId>
- <artifactId>dme2</artifactId>
- <version>3.1.200-oss</version>
- <exclusions>
- <exclusion>
- <groupId>javax.jms</groupId>
- <artifactId>jms</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- slf4j logger -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.7.6</version>
- </dependency>
-
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
- </dependency>
-
- <dependency>
- <groupId>com.att.ajsc</groupId>
- <artifactId>ajsc-core</artifactId>
- <version>1.0.0</version>
- </dependency>
-
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- <version>2.0.1</version>
- </dependency>
-
- <!-- <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-rs-client</artifactId>
- <version>${cxf.version}</version> </dependency> <dependency> <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxws</artifactId> <version>${cxf.version}</version>
- </dependency> <dependency> <groupId>org.apache.cxf</groupId> <artifactId>cxf-rt-transports-http</artifactId>
- <version>${cxf.version}</version> </dependency> Jetty is needed if you're
- are not using the CXFServlet <dependency> <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http-jetty</artifactId> <version>${cxf.version}</version>
- </dependency> -->
- <!-- Begin - Spring Dependencies for DI -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${spring.version}</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-expression</artifactId>
- <version>4.3.18.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>5.2.3.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>4.3.18.RELEASE</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>3.0.1</version>
- <scope>provided</scope>
- </dependency>
- <!-- End - Spring Dependencies for DI -->
- <!-- Begin - Dependency on Dmaap Spring layer -->
- <!-- <dependency> <groupId>com.att.dmaap</groupId> <artifactId>dmaap-spring</artifactId>
- <version>0.0.1-SNAPSHOT</version> </dependency> -->
- <!-- End - Dependency on Dmaap Spring layer -->
- <!-- Begin - Dependency on log4j for logging purpose -->
- <!-- <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId>
- <version>1.2.17</version> </dependency> -->
- <!-- Log4j's enhanced pattern layout is shipped separately <dependency>
- <groupId>log4j</groupId> <artifactId>apache-log4j-extras</artifactId> <version>1.2.17</version>
- </dependency> -->
- <!-- End - Dependency on log4j for logging purpose -->
- <!-- ZooKeeper Library -->
- <dependency>
- <groupId>org.apache.zookeeper</groupId>
- <artifactId>zookeeper</artifactId>
- <version>3.4.14</version>
- </dependency>
-
- <!-- JSON libraries -->
- <dependency>
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- <version>20131018</version>
- </dependency>
-
- <!-- Apache Kafka -->
-<dependency>
- <groupId>org.apache.kafka</groupId>
- <artifactId>kafka_2.11</artifactId>
- <version>0.11.0.3</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.13</version>
- </dependency>
- <dependency>
- <groupId>com.google.guava</groupId>
- <artifactId>guava</artifactId>
- <version>23.6.1-jre</version>
- </dependency>
-
- <dependency>
- <groupId>com.att.eelf</groupId>
- <artifactId>eelf-core</artifactId>
- <version>0.0.1</version>
- <scope>compile</scope>
- </dependency>
- <!-- our NSA server library -->
- <dependency>
- <groupId>com.att.nsa</groupId>
- <artifactId>nsaServerLibrary</artifactId>
- <version>1.0.10</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-catalina</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-util</artifactId>
- </exclusion>
- <exclusion>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.att.nsa</groupId>
- <artifactId>saToolkit</artifactId>
- <version>0.0.1</version>
- </dependency>
- <dependency>
- <groupId>com.sun.mail</groupId>
- <artifactId>javax.mail</artifactId>
- <version>1.6.0</version>
- <exclusions>
- <!-- javax activation is part of the JDK now -->
- <exclusion>
- <groupId>javax.activation</groupId>
- <artifactId>activation</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- our Highland Park library -->
- <!-- <dependency> <groupId>com.att.nsa</groupId> <artifactId>highlandParkCore</artifactId>
- <version>0.4.9</version> </dependency> -->
-
- <!-- our base client library, for its command line tools -->
- <dependency>
- <groupId>com.att.nsa</groupId>
- <artifactId>saClientLibrary</artifactId>
- <version>0.0.1</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient-cache</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>4.5.3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient-cache</artifactId>
- <version>4.5.3</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpcore</artifactId>
- <version>4.4.1</version>
- </dependency>
-
-
- <!-- explicit jline add b/c it conflicts with the zk client -->
- <dependency>
- <groupId>jline</groupId>
- <artifactId>jline</artifactId>
- <version>2.12.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-recipes</artifactId>
- <version>4.0.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.curator</groupId>
- <artifactId>curator-test</artifactId>
- <version>4.0.1</version>
- </dependency>
-
-
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.8.0</version>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- <version>2.8.11</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>2.8.11.1</version>
- </dependency>
-
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
- <version>1.6.4</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>1.6.4</version>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4-rule</artifactId>
- <version>1.6.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>1.10.19</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
- <build>
- <finalName>DMaaP</finalName>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>true</filtering>
- <includes>
- <include>**/*.properties</include>
- </includes>
- </resource>
- <!-- <resource> <directory>src/main/config</directory> <filtering>true</filtering>
- <includes> <include>**/log4j*.xml</include> </includes> </resource> <resource>
- <directory>src/main/resources</directory> <filtering>false</filtering> <excludes>
- <exclude>**/cambriaApiVersion.properties</exclude> </excludes> </resource> -->
- </resources>
- <plugins>
- <!-- <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.4.1</version>
- <configuration> <descriptors> <descriptor>src/assembly/dep.xml</descriptor>
- </descriptors> </configuration> <executions> <execution> <id>make-assembly</id>
- this is used for inheritance merges -->
- <!-- <phase>package</phase> bind to the packaging phase <goals> <goal>single</goal>
- </goals> </execution> </executions> </plugin> -->
- <!-- -->
- <plugin>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>2.17</version>
- <dependencies>
- <dependency>
- <groupId>org.onap.oparent</groupId>
- <artifactId>checkstyle</artifactId>
- <version>2.0.0</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>onap-license</id>
- <goals>
- <goal>check</goal>
- </goals>
- <phase>process-sources</phase>
- <configuration>
- <configLocation>onap-checkstyle/check-license.xml</configLocation>
- <includeResources>false</includeResources>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- <includeTestResources>false</includeTestResources>
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
- <excludes>
- </excludes>
- <consoleOutput>true</consoleOutput>
- <failsOnViolation>false</failsOnViolation>
- </configuration>
- </execution>
- <execution>
- <id>onap-java-style</id>
- <goals>
- <goal>check</goal>
- </goals>
- <phase>none</phase>
- <configuration>
- <!-- Use Google Java Style Guide:
- https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
- with minor changes -->
- <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
- <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
- <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
- <includeResources>true</includeResources>
- <includeTestSourceDirectory>true</includeTestSourceDirectory>
- <includeTestResources>true</includeTestResources>
- <excludes>
- </excludes>
- <consoleOutput>true</consoleOutput>
- <failsOnViolation>false</failsOnViolation>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <version>3.6</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-webdav-jackrabbit</artifactId>
- <version>2.10</version>
- </dependency>
- </dependencies>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>2.10.4</version>
- <configuration>
- <additionalparam>-Xdoclint:none</additionalparam>
- </configuration>
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>3.0.0</version>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar-no-fork</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.12.4</version>
- <configuration>
- <excludes>
- <!-- exclude until junits updated <exclude>**/DME2*.java</exclude> -->
- </excludes>
- <!-- <skipTests>true</skipTests> -->
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- </execution>
- <execution>
- <id>report</id>
- <goals>
- <goal>report</goal>
- </goals>
- <configuration>
- <dataFile>${project.build.directory}/code-coverage/jacoco.exec</dataFile>
- <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <!-- <profiles> <profile> <id>jenkins</id> <activation> <property> <name>env.BUILD_NUMBER</name>
- </property> </activation> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId> </plugin> <plugin> <groupId>com.att.aft.swm</groupId>
- <artifactId>swm-plugin</artifactId> <version>1.4.4.12</version> <configuration>
- <distFilesRootDirPath>/opt/app/dmaap/msgrtr/jenkinsbuild</distFilesRootDirPath>
- <version>${project.version}-${env.BUILD_NUMBER}</version> <scriptExcludes>
- <scriptExclude>**/swmpkgclean.sh</scriptExclude> </scriptExcludes> </configuration>
- <executions> <execution> <id>pkgstage</id> <goals> <goal>pkgstage</goal>
- </goals> </execution> <execution> <id>pkgcreate</id> <goals> <goal>pkgcreate</goal>
- </goals> </execution> <execution> <id>pkginstall</id> <goals> <goal>install</goal>
- </goals> <configuration> <componentName>com.att.nsa:msgrtr</componentName>
- <version>${project.version}-${env.BUILD_NUMBER}</version> <waitTimeMins>4</waitTimeMins>
- <properties> <property> <name>overrideDependencyConflicts</name> <value>true</value>
- </property> <property> <name>AFTSWM_NOTIFY_ADDRESSES</name> <value>mailto:rs857c@att.com</value>
- </property> </properties> </configuration> </execution> </executions> </plugin>
- <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution>
- <phase>package</phase> <configuration> <tasks> <copy file="./src/main/scripts/swmpkgclean.sh"
- toDir="./target" /> </tasks> </configuration> <goals> <goal>run</goal> </goals>
- </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-deploy-plugin</artifactId> <version>2.5</version> <configuration>
- <skip>true</skip> </configuration> </plugin> </plugins> </build> </profile>
- </profiles> -->
+ <sonar.exclusions>**/gen/**,**/generated-sources/**,**/yang-gen**,**/pax/**
+ </sonar.exclusions>
+ <sitePath>
+ /content/sites/site/org/onap/dmaap/messagerouter/msgrtr/${project.artifactId}/${project.version}
+ </sitePath>
+ <nexusproxy>https://nexus.onap.org</nexusproxy>
+ </properties>
+
+ <!-- Distribution management -->
+ <!-- Currently all artifacts will be uploaded to att-public-group reposiotry on Maven Central -->
+ <distributionManagement>
+ <site>
+ <id>ecomp-site</id>
+ <url>dav:${nexusproxy}${sitePath}</url>
+ </site>
+ </distributionManagement>
+ <!-- End Distribution management -->
+
+ <licenses>
+ <license>
+ <name>Apache License Version 2.0</name>
+ </license>
+ </licenses>
+
+ <developers>
+ <developer>
+ <name>Rajashree</name>
+ <email></email>
+ <organization>ATT</organization>
+ <organizationUrl>www.att.com</organizationUrl>
+ </developer>
+ <developer>
+ <name>Ramkumar</name>
+ <email></email>
+ <organization>ATT</organization>
+ <organizationUrl>www.att.com</organizationUrl>
+ </developer>
+ </developers>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>1.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.grails</groupId>
+ <artifactId>grails-web</artifactId>
+ <version>2.5.4</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.grails</groupId>
+ <artifactId>grails-web-jsp</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.grails</groupId>
+ <artifactId>grails-bootstrap</artifactId>
+ <version>4.0.1</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>ant</artifactId>
+ <groupId>org.apache.ant</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jna</artifactId>
+ <groupId>net.java.dev.jna</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>ant-trax</artifactId>
+ <groupId>org.apache.ant</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>gant_groovy1.8</artifactId>
+ <groupId>org.codehaus.gant</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>ant-launcher</artifactId>
+ <groupId>org.apache.ant</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jline</artifactId>
+ <groupId>jline</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>ivy</artifactId>
+ <groupId>org.apache.ivy</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jansi</artifactId>
+ <groupId>org.fusesource.jansi</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>commons-logging</artifactId>
+ <groupId>commons-logging</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>ant-junit</artifactId>
+ <groupId>org.apache.ant</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>${spring.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>2.4.8</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>jline</artifactId>
+ <groupId>jline</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.att.aft</groupId>
+ <artifactId>dme2</artifactId>
+ <version>3.1.200-oss</version>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- slf4j logger -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.7.6</version>
+ </dependency>
+ <!-- Log4j2 logger -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-api</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.att.ajsc</groupId>
+ <artifactId>ajsc-core</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+
+ <!-- Begin - Spring Dependencies for DI -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-expression</artifactId>
+ <version>4.3.18.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>5.2.3.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>4.3.18.RELEASE</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.0.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- ZooKeeper Library -->
+ <dependency>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ <version>3.4.14</version>
+ </dependency>
+
+ <!-- JSON libraries -->
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ <version>20131018</version>
+ </dependency>
+
+ <!-- Apache Kafka -->
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>kafka_2.11</artifactId>
+ <version>0.11.0.3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.15</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>23.6.1-jre</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.att.eelf</groupId>
+ <artifactId>eelf-core</artifactId>
+ <version>0.0.1</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- our NSA server library -->
+ <dependency>
+ <groupId>com.att.nsa</groupId>
+ <artifactId>nsaServerLibrary</artifactId>
+ <version>1.0.10</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-catalina</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-util</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>com.att.nsa</groupId>
+ <artifactId>saToolkit</artifactId>
+ <version>0.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.mail</groupId>
+ <artifactId>javax.mail</artifactId>
+ <version>1.6.0</version>
+ <exclusions>
+ <!-- javax activation is part of the JDK now -->
+ <exclusion>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- our base client library, for its command line tools -->
+ <dependency>
+ <groupId>com.att.nsa</groupId>
+ <artifactId>saClientLibrary</artifactId>
+ <version>0.0.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient-cache</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>4.5.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient-cache</artifactId>
+ <version>4.5.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore</artifactId>
+ <version>4.4.1</version>
+ </dependency>
+
+ <!-- explicit jline add b/c it conflicts with the zk client -->
+ <dependency>
+ <groupId>jline</groupId>
+ <artifactId>jline</artifactId>
+ <version>2.12.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-recipes</artifactId>
+ <version>4.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.curator</groupId>
+ <artifactId>curator-test</artifactId>
+ <version>4.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.8.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <version>2.8.11</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.11.2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <version>1.6.4</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <version>1.6.4</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4-rule</artifactId>
+ <version>1.6.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>1.10.19</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <finalName>DMaaP</finalName>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.17</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.oparent</groupId>
+ <artifactId>checkstyle</artifactId>
+ <version>2.0.0</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>onap-license</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <configLocation>onap-checkstyle/check-license.xml</configLocation>
+ <includeResources>false</includeResources>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <includeTestResources>false</includeTestResources>
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <excludes>
+ </excludes>
+ <consoleOutput>true</consoleOutput>
+ <failsOnViolation>false</failsOnViolation>
+ </configuration>
+ </execution>
+ <execution>
+ <id>onap-java-style</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>none</phase>
+ <configuration>
+ <!-- Use Google Java Style Guide:
+ https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml
+ with minor changes -->
+ <configLocation>onap-checkstyle/onap-java-style.xml</configLocation>
+ <!-- <sourceDirectory> is needed so that checkstyle ignores the generated sources directory -->
+ <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+ <includeResources>true</includeResources>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <includeTestResources>true</includeTestResources>
+ <excludes>
+ </excludes>
+ <consoleOutput>true</consoleOutput>
+ <failsOnViolation>false</failsOnViolation>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.6</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav-jackrabbit</artifactId>
+ <version>2.10</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.10.4</version>
+ <configuration>
+ <additionalparam>-Xdoclint:none</additionalparam>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.12.4</version>
+ <configuration>
+ <excludes>
+ <!-- exclude until junits updated <exclude>**/DME2*.java</exclude> -->
+ </excludes>
+ <!-- <skipTests>true</skipTests> -->
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.jacoco</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>prepare-agent</id>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <dataFile>${project.build.directory}/code-coverage/jacoco.exec
+ </dataFile>
+ <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut
+ </outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/src/main/swm/common/localize.sh b/src/main/swm/common/localize.sh
index c6aa5ed..2f2922b 100644
--- a/src/main/swm/common/localize.sh
+++ b/src/main/swm/common/localize.sh
@@ -88,10 +88,10 @@ sed -e 's/${CAMBRIA_SERVICE_PORT}/'${CAMBRIA_SERVICE_PORT}'/g' \
exit 7
}
-FINAL_LOG4J_FILE=${ROOT_DIR}/etc/log4j.xml
-TEMPLATE_LOG4J_FILE=${ROOT_DIR}/etc/log4j_template.xml
-BACKUP1_LOG4J_FILE=${ROOT_DIR}/etc/log4j.xml.bk.1
-BACKUP2_LOG4J_FILE=${ROOT_DIR}/etc/log4j.xml.bk.2
+FINAL_LOG4J_FILE=${ROOT_DIR}/etc/log4j2.xml
+TEMPLATE_LOG4J_FILE=${ROOT_DIR}/etc/log4j2_template.xml
+BACKUP1_LOG4J_FILE=${ROOT_DIR}/etc/log4j2.xml.bk.1
+BACKUP2_LOG4J_FILE=${ROOT_DIR}/etc/log4j2.xml.bk.2
if [ -z "${CAMBRIA_LOG_DIR}" ]; then
CAMBRIA_LOG_DIR=${ROOT_DIR}/logs
diff --git a/src/test/java/org/onap/dmaap/mr/apiServer/metrics/cambria/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/apiServer/metrics/cambria/JUnitTestSuite.java
index 4bef234..9758383 100644
--- a/src/test/java/org/onap/dmaap/mr/apiServer/metrics/cambria/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/apiServer/metrics/cambria/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,25 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dmaap.mr.apiServer.metrics.cambria;
+package org.onap.dmaap.mr.apiServer.metrics.cambria;
import junit.framework.TestSuite;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ DMaaPMetricsSenderTest.class})
+@SuiteClasses({DMaaPMetricsSenderTest.class})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/apiServer/metrics/cambria/TestRunner.java b/src/test/java/org/onap/dmaap/mr/apiServer/metrics/cambria/TestRunner.java
index 2eb7c1c..c1150e9 100644
--- a/src/test/java/org/onap/dmaap/mr/apiServer/metrics/cambria/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/apiServer/metrics/cambria/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dmaap.mr.apiServer.metrics.cambria;
+package org.onap.dmaap.mr.apiServer.metrics.cambria;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/JUnitTestSuite.java
index d9e3483..bcac8d9 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,25 +18,26 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dmaap.mr.cambria;
+package org.onap.dmaap.mr.cambria;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ CambriaApiExceptionTest.class, CambriaApiVersionInfoTest.class, CambriaApiTestCase.class, CambriaRateLimiterTest.class, })
+@SuiteClasses({CambriaApiExceptionTest.class, CambriaApiVersionInfoTest.class,
+ CambriaApiTestCase.class, CambriaRateLimiterTest.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/TestRunner.java
index f276888..8465cbe 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dmaap.mr.cambria;
+package org.onap.dmaap.mr.cambria;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/backends/kafka/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/backends/kafka/JUnitTestSuite.java
index de77603..d299fdd 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/backends/kafka/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/backends/kafka/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,25 +18,26 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.backends.kafka;
+package org.onap.dmaap.mr.cambria.backends.kafka;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ KafkaConsumerCacheTest.class, KafkaPublisherTest.class,Kafka011ConsumerTest.class,KafkaLiveLockAvoider2Test.class })
+@SuiteClasses({KafkaConsumerCacheTest.class, KafkaPublisherTest.class, Kafka011ConsumerTest.class,
+ KafkaLiveLockAvoider2Test.class})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/backends/kafka/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/backends/kafka/TestRunner.java
index 8f70091..38261e1 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/backends/kafka/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/backends/kafka/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.backends.kafka;
+package org.onap.dmaap.mr.cambria.backends.kafka;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/backends/memory/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/backends/memory/JUnitTestSuite.java
index d577ae8..c38be64 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/backends/memory/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/backends/memory/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,26 +18,26 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.backends.memory;
+package org.onap.dmaap.mr.cambria.backends.memory;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ MemoryConsumerFactoryTest.class, MemoryMetaBrokerTest.class, MemoryQueueTest.class,
- MemoryQueuePublisherTest.class, MessageLoggerTest.class, })
+@SuiteClasses({MemoryConsumerFactoryTest.class, MemoryMetaBrokerTest.class, MemoryQueueTest.class,
+ MemoryQueuePublisherTest.class, MessageLoggerTest.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/backends/memory/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/backends/memory/TestRunner.java
index c6af86e..2f0a215 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/backends/memory/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/backends/memory/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.backends.memory;
+package org.onap.dmaap.mr.cambria.backends.memory;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/beans/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/beans/JUnitTestSuite.java
index 1589290..cf48007 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/beans/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/beans/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,32 +18,36 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.beans;
+package org.onap.dmaap.mr.cambria.beans;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ ApiKeyBeanTest.class, ApiKeyBeanTest2.class, ApiKeyBeanTest3.class, ApiKeyBeanTest4.class, ApiKeyBeanTest5.class, ApiKeyBeanTest6.class,
- DMaaPCambriaLimiterTest.class, DMaaPContextTest.class, DMaaPContextTest2.class,
- DMaaPContextTest3.class,DMaaPContextTest4.class,DMaaPContextTest5.class,DMaaPContextTest6.class,
- LogDetailsTest.class, LogDetailsTest2.class,LogDetailsTest3.class,LogDetailsTest4.class,LogDetailsTest5.class,LogDetailsTest6.class,
- LogDetailsTest7.class,LogDetailsTest8.class,LogDetailsTest9.class,LogDetailsTest10.class,LogDetailsTest11.class,LogDetailsTest12.class,
- LogDetailsTest13.class,LogDetailsTest14.class,LogDetailsTest15.class,LogDetailsTest16.class, TopicBeanTest.class,TopicBeanTest2.class,TopicBeanTest3.class,
- TopicBeanTest4.class,TopicBeanTest5.class,TopicBeanTest6.class,TopicBeanTest7.class,TopicBeanTest8.class,TopicBeanTest9.class,TopicBeanTest10.class,})
+@SuiteClasses({ApiKeyBeanTest.class, ApiKeyBeanTest2.class, ApiKeyBeanTest3.class,
+ ApiKeyBeanTest4.class, ApiKeyBeanTest5.class, ApiKeyBeanTest6.class,
+ DMaaPCambriaLimiterTest.class, DMaaPContextTest.class, DMaaPContextTest2.class,
+ DMaaPContextTest3.class, DMaaPContextTest4.class, DMaaPContextTest5.class,
+ DMaaPContextTest6.class, LogDetailsTest.class, LogDetailsTest2.class,
+ LogDetailsTest3.class, LogDetailsTest4.class, LogDetailsTest5.class, LogDetailsTest6.class,
+ LogDetailsTest7.class, LogDetailsTest8.class, LogDetailsTest9.class, LogDetailsTest10.class,
+ LogDetailsTest11.class, LogDetailsTest12.class, LogDetailsTest13.class, LogDetailsTest14.class,
+ LogDetailsTest15.class, LogDetailsTest16.class, TopicBeanTest.class, TopicBeanTest2.class,
+ TopicBeanTest3.class, TopicBeanTest4.class, TopicBeanTest5.class, TopicBeanTest6.class,
+ TopicBeanTest7.class, TopicBeanTest8.class, TopicBeanTest9.class, TopicBeanTest10.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/beans/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/beans/TestRunner.java
index f65bdfa..dc024b4 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/beans/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/beans/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.beans;
+package org.onap.dmaap.mr.cambria.beans;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/exception/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/exception/JUnitTestSuite.java
index e7aedac..dc0cf50 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/exception/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/exception/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,26 +18,26 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.exception;
+package org.onap.dmaap.mr.cambria.exception;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ DMaaPCambriaExceptionMapperTest.class,
- DMaaPErrorMessagesTest.class, DMaaPWebExceptionMapperTest.class, ErrorResponseTest.class})
+@SuiteClasses({DMaaPCambriaExceptionMapperTest.class,
+ DMaaPErrorMessagesTest.class, DMaaPWebExceptionMapperTest.class, ErrorResponseTest.class})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/exception/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/exception/TestRunner.java
index cd5a2ff..77920c8 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/exception/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/exception/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.exception;
+package org.onap.dmaap.mr.cambria.exception;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/listener/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/listener/JUnitTestSuite.java
index 38efa3b..0dd7db5 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/listener/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/listener/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -19,25 +19,25 @@
*/
- package org.onap.dmaap.mr.cambria.listener;
+package org.onap.dmaap.mr.cambria.listener;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ DME2EndPointLoaderTest.class, CambriaServletContextListenerTest.class })
+@SuiteClasses({DME2EndPointLoaderTest.class, CambriaServletContextListenerTest.class})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/listener/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/listener/TestRunner.java
index 636c7b4..82078c6 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/listener/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/listener/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.listener;
+package org.onap.dmaap.mr.cambria.listener;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
-}
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
+} \ No newline at end of file
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/metabroker/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/metabroker/JUnitTestSuite.java
index 4224aae..b321af5 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/metabroker/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/metabroker/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,25 +18,25 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.metabroker;
+package org.onap.dmaap.mr.cambria.metabroker;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ BrokerImplTest.class, TopicImplemTest.class, })
+@SuiteClasses({BrokerImplTest.class, TopicImplemTest.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/metabroker/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/metabroker/TestRunner.java
index 072c9e3..acf2184 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/metabroker/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/metabroker/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.metabroker;
+package org.onap.dmaap.mr.cambria.metabroker;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/JUnitTestSuite.java
index 87b6e8b..8dbcf12 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,25 +18,25 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.metrics.publisher;
+package org.onap.dmaap.mr.cambria.metrics.publisher;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ DMaaPCambriaClientFactoryTest.class, CambriaPublisherUtilityTest.class})
+@SuiteClasses({DMaaPCambriaClientFactoryTest.class, CambriaPublisherUtilityTest.class})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/TestRunner.java
index b7e997f..92e9f7d 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.metrics.publisher;
+package org.onap.dmaap.mr.cambria.metrics.publisher;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/impl/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/impl/JUnitTestSuite.java
index 2b72f70..4bb1d15 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/impl/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/impl/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,26 +18,26 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.metrics.publisher.impl;
+package org.onap.dmaap.mr.cambria.metrics.publisher.impl;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ DMaaPCambriaSimplerBatchPublisherTest.class, ClockTest.class,
- CambriaBaseClientTest.class, DMaaPCambriaConsumerImplTest.class})
+@SuiteClasses({DMaaPCambriaSimplerBatchPublisherTest.class, ClockTest.class,
+ CambriaBaseClientTest.class, DMaaPCambriaConsumerImplTest.class})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/impl/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/impl/TestRunner.java
index 895e93f..451be9e 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/impl/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/metrics/publisher/impl/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.metrics.publisher.impl;
+package org.onap.dmaap.mr.cambria.metrics.publisher.impl;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/resources/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/resources/JUnitTestSuite.java
index d35105a..5fd3143 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/resources/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/resources/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,25 +18,25 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.resources;
+package org.onap.dmaap.mr.cambria.resources;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ CambriaEventSetTest.class,CambriaOutboundEventStreamTest.class, })
+@SuiteClasses({CambriaEventSetTest.class, CambriaOutboundEventStreamTest.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/resources/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/resources/TestRunner.java
index 92b94d5..c701f10 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/resources/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/resources/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.resources;
+package org.onap.dmaap.mr.cambria.resources;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/resources/streamReaders/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/resources/streamReaders/JUnitTestSuite.java
index a01fa6c..da7626b 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/resources/streamReaders/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/resources/streamReaders/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,26 +18,26 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.resources.streamReaders;
+package org.onap.dmaap.mr.cambria.resources.streamReaders;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ CambriaJsonStreamReaderTest.class,CambriaRawStreamReaderTest.class,
- CambriaStreamReaderTest.class, CambriaTextStreamReaderTest.class, })
+@SuiteClasses({CambriaJsonStreamReaderTest.class, CambriaRawStreamReaderTest.class,
+ CambriaStreamReaderTest.class, CambriaTextStreamReaderTest.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/resources/streamReaders/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/resources/streamReaders/TestRunner.java
index 5da7245..22f7656 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/resources/streamReaders/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/resources/streamReaders/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.resources.streamReaders;
+package org.onap.dmaap.mr.cambria.resources.streamReaders;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/security/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/security/JUnitTestSuite.java
index ea3f051..667ee04 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/security/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/security/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,27 +18,27 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.security;
+package org.onap.dmaap.mr.cambria.security;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
import org.onap.dmaap.dmf.mr.security.DMaaPAAFAuthenticatorImplTest;
@RunWith(Suite.class)
-@SuiteClasses({ DMaaPAAFAuthenticatorImplTest.class,DMaaPAuthenticatorImplTest.class,
+@SuiteClasses({DMaaPAAFAuthenticatorImplTest.class, DMaaPAuthenticatorImplTest.class,
})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/security/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/security/TestRunner.java
index e294538..30a6387 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/security/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/security/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.security;
+package org.onap.dmaap.mr.cambria.security;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/security/impl/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/security/impl/JUnitTestSuite.java
index 3a54ac5..48cf300 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/security/impl/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/security/impl/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,26 +18,26 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.security.impl;
+package org.onap.dmaap.mr.cambria.security.impl;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ DMaaPMechIdAuthenticatorTest.class, DMaaPOriginalUebAuthenticatorTest.class,
+@SuiteClasses({DMaaPMechIdAuthenticatorTest.class, DMaaPOriginalUebAuthenticatorTest.class,
})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/security/impl/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/security/impl/TestRunner.java
index 2699acd..57285f6 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/security/impl/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/security/impl/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.security.impl;
+package org.onap.dmaap.mr.cambria.security.impl;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/service/impl/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/service/impl/JUnitTestSuite.java
index 7536127..5ba8ec2 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/service/impl/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/service/impl/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,28 +18,30 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.service.impl;
+package org.onap.dmaap.mr.cambria.service.impl;
import junit.framework.TestSuite;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
import org.onap.dmaap.dmf.mr.service.impl.EventsServiceImplTest;
import org.onap.dmaap.dmf.mr.service.impl.TopicServiceImplTest;
@RunWith(Suite.class)
-@SuiteClasses({ UIServiceImplTest.class, AdminServiceImplemTest.class, ApiKeysServiceImplTest.class,
- ShowConsumerCacheTest.class,TopicServiceImplTest.class, TransactionServiceImplTest.class, MMServiceImplTest.class,
- BaseTransactionDbImplTest.class, MetricsServiceImplTest.class, EventsServiceImplTest.class})
+@SuiteClasses({UIServiceImplTest.class, AdminServiceImplemTest.class, ApiKeysServiceImplTest.class,
+ ShowConsumerCacheTest.class, TopicServiceImplTest.class, TransactionServiceImplTest.class,
+ MMServiceImplTest.class,
+ BaseTransactionDbImplTest.class, MetricsServiceImplTest.class, EventsServiceImplTest.class})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/service/impl/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/service/impl/TestRunner.java
index 277950a..5e296b7 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/service/impl/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/service/impl/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.service.impl;
+package org.onap.dmaap.mr.cambria.service.impl;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/transaction/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/transaction/JUnitTestSuite.java
index eded211..1fad8f3 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/transaction/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/transaction/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,25 +18,25 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.transaction;
+package org.onap.dmaap.mr.cambria.transaction;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ TransactionObjTest.class, TrnRequestTest.class, })
+@SuiteClasses({TransactionObjTest.class, TrnRequestTest.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/transaction/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/transaction/TestRunner.java
index b2ba612..7fc990e 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/transaction/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/transaction/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.transaction;
+package org.onap.dmaap.mr.cambria.transaction;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/transaction/impl/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/cambria/transaction/impl/JUnitTestSuite.java
index a70cf18..f173b57 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/transaction/impl/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/transaction/impl/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,25 +18,25 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.transaction.impl;
+package org.onap.dmaap.mr.cambria.transaction.impl;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ DMaaPSimpleTransactionFactoryTest.class, })
+@SuiteClasses({DMaaPSimpleTransactionFactoryTest.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/cambria/transaction/impl/TestRunner.java b/src/test/java/org/onap/dmaap/mr/cambria/transaction/impl/TestRunner.java
index e889ec7..212f551 100644
--- a/src/test/java/org/onap/dmaap/mr/cambria/transaction/impl/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/cambria/transaction/impl/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
- package org.onap.dmaap.mr.cambria.transaction.impl;
+package org.onap.dmaap.mr.cambria.transaction.impl;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/filter/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/filter/JUnitTestSuite.java
index a534560..7aa0d28 100644
--- a/src/test/java/org/onap/dmaap/mr/filter/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/filter/JUnitTestSuite.java
@@ -7,9 +7,9 @@
* 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.
@@ -21,22 +21,22 @@
package org.onap.dmaap.mr.filter;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ ContentLengthFilterTest.class, DefaultLengthTest.class,})
+@SuiteClasses({ContentLengthFilterTest.class, DefaultLengthTest.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/filter/TestRunner.java b/src/test/java/org/onap/dmaap/mr/filter/TestRunner.java
index ec78329..d5b3972 100644
--- a/src/test/java/org/onap/dmaap/mr/filter/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/filter/TestRunner.java
@@ -7,9 +7,9 @@
* 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.
@@ -18,24 +18,24 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.dmaap.mr.filter;
+package org.onap.dmaap.mr.filter;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2AdminTest.java b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2AdminTest.java
index da786ad..91d897c 100644
--- a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2AdminTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2AdminTest.java
@@ -8,7 +8,7 @@
* 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.
@@ -17,132 +17,125 @@
* ============LICENSE_END=========================================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
+ *
*******************************************************************************/
package org.onap.dmaap.mr.test.dme2;
+import com.att.aft.dme2.api.DME2Client;
+import com.att.aft.dme2.api.DME2Exception;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Properties;
+import junit.framework.TestCase;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
-import org.apache.log4j.Logger;
+public class DME2AdminTest extends TestCase {
-import junit.framework.TestCase;
+ private static final Logger LOGGER = LogManager.getLogger(DME2AdminTest.class);
-import com.att.aft.dme2.api.DME2Client;
-import com.att.aft.dme2.api.DME2Exception;
-//import com.ibm.disthub2.impl.client.PropSchema;
+ protected String url;
-public class DME2AdminTest extends TestCase {
- private static final Logger LOGGER = Logger.getLogger(DME2AdminTest.class);
-
- protected String url;
-
- protected Properties props;
-
- protected HashMap<String, String> hm;
-
- protected String methodType;
-
- protected String contentType;
-
- protected String user;
-
- protected String password;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- System.setProperty("AFT_DME2_CLIENT_SSL_INCLUDE_PROTOCOLS", "SSLv3,TLSv1,TLSv1.1");
- System.setProperty("AFT_DME2_CLIENT_IGNORE_SSL_CONFIG", "false");
- System.setProperty("AFT_DME2_CLIENT_KEYSTORE_PASSWORD", "changeit");
- this.props = LoadPropertyFile.getPropertyFileDataProducer();
- String latitude = props.getProperty("Latitude");
- String longitude = props.getProperty("Longitude");
- String version = props.getProperty("Version");
- String serviceName = props.getProperty("ServiceName");
- serviceName = "mr/admin";
- String env = props.getProperty("Environment");
- String partner = props.getProperty("Partner");
- String protocol = props.getProperty("Protocol");
-
- methodType = props.getProperty("MethodTypeGet");
- contentType = props.getProperty("contenttype");
- user = props.getProperty("user");
- password = props.getProperty("password");
-
-
- this.url = protocol + "://" + serviceName + "?" + "version=" + version + "&" + "envContext=" + env + "&"
- + "routeOffer=" + partner + "&partner=BOT_R";
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
- hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
- }
-
- public void testGetConsumerCache() {
- LOGGER.info("test case consumer cache started");
-
- String subContextPath = props.getProperty("SubContextPathGetAdminConsumerCache");
- try {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(methodType);
- sender.setSubContext(subContextPath);
- sender.setPayload("");
- sender.addHeader("Content-Type", contentType);
-
- sender.addHeader("X-CambriaAuth", "user1:7J49YriFlyRgebyOsSJhZvY/C60=");
- sender.addHeader("X-X-CambriaDate", "2016-10-18T09:56:04-05:00");
-
- //sender.setCredentials(user, password);
- sender.setHeaders(hm);
- LOGGER.info("Getting consumer Cache");
- String reply = sender.sendAndWait(5000L);
- System.out.println(reply);
- assertTrue(LoadPropertyFile.isValidJsonString(reply));
- assertNotNull(reply);
- LOGGER.info("response from consumer cache=" + reply);
-
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void ttestDropConsumerCache() {
- LOGGER.info("Drom consumer cache initiated");
-
- String subContextPath = props.getProperty("SubContextPathDropAdminConsumerCache");
-
- try {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(methodType);
- sender.setSubContext(subContextPath);
- sender.setPayload("");
- sender.addHeader("Content-Type", contentType);
- sender.setCredentials(user, password);
- sender.setHeaders(hm);
-
- LOGGER.info("Dropping consumer cache...........");
- String reply = sender.sendAndWait(5000L);
-
- // assertTrue(LoadPropertyFile.isValidJsonString(reply));
- assertNotNull(reply);
- LOGGER.info("response =" + reply);
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
+ protected Properties props;
+
+ protected HashMap<String, String> hm;
+
+ protected String methodType;
+
+ protected String contentType;
+
+ protected String user;
+
+ protected String password;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ System.setProperty("AFT_DME2_CLIENT_SSL_INCLUDE_PROTOCOLS", "SSLv3,TLSv1,TLSv1.1");
+ System.setProperty("AFT_DME2_CLIENT_IGNORE_SSL_CONFIG", "false");
+ System.setProperty("AFT_DME2_CLIENT_KEYSTORE_PASSWORD", "changeit");
+ this.props = LoadPropertyFile.getPropertyFileDataProducer();
+ String latitude = props.getProperty("Latitude");
+ String longitude = props.getProperty("Longitude");
+ String version = props.getProperty("Version");
+ String serviceName = props.getProperty("ServiceName");
+ serviceName = "mr/admin";
+ String env = props.getProperty("Environment");
+ String partner = props.getProperty("Partner");
+ String protocol = props.getProperty("Protocol");
+
+ methodType = props.getProperty("MethodTypeGet");
+ contentType = props.getProperty("contenttype");
+ user = props.getProperty("user");
+ password = props.getProperty("password");
+ this.url =
+ protocol + "://" + serviceName + "?" + "version=" + version + "&" + "envContext=" + env
+ + "&"
+ + "routeOffer=" + partner + "&partner=BOT_R";
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+ hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ }
+
+ public void testGetConsumerCache() {
+ LOGGER.info("test case consumer cache started");
+ String subContextPath = props.getProperty("SubContextPathGetAdminConsumerCache");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(methodType);
+ sender.setSubContext(subContextPath);
+ sender.setPayload("");
+ sender.addHeader("Content-Type", contentType);
+
+ sender.addHeader("X-CambriaAuth", "user1:7J49YriFlyRgebyOsSJhZvY/C60=");
+ sender.addHeader("X-X-CambriaDate", "2016-10-18T09:56:04-05:00");
+
+ //sender.setCredentials(user, password);
+ sender.setHeaders(hm);
+ LOGGER.info("Getting consumer Cache");
+ String reply = sender.sendAndWait(5000L);
+ System.out.println(reply);
+ assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ assertNotNull(reply);
+ LOGGER.info("response from consumer cache=" + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void ttestDropConsumerCache() {
+ LOGGER.info("Drom consumer cache initiated");
+ String subContextPath = props.getProperty("SubContextPathDropAdminConsumerCache");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(methodType);
+ sender.setSubContext(subContextPath);
+ sender.setPayload("");
+ sender.addHeader("Content-Type", contentType);
+ sender.setCredentials(user, password);
+ sender.setHeaders(hm);
+
+ LOGGER.info("Dropping consumer cache...........");
+ String reply = sender.sendAndWait(5000L);
+ // assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ assertNotNull(reply);
+ LOGGER.info("response =" + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ApiKeyTest.java b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ApiKeyTest.java
index ad45706..b49b2b4 100644
--- a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ApiKeyTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ApiKeyTest.java
@@ -8,7 +8,7 @@
* 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.
@@ -17,114 +17,105 @@
* ============LICENSE_END=========================================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
+ *
*******************************************************************************/
package org.onap.dmaap.mr.test.dme2;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Properties;
-
-import org.apache.log4j.Logger;
-import org.json.JSONObject;
-
import com.att.aft.dme2.api.DME2Client;
import com.att.aft.dme2.api.DME2Exception;
import com.att.aft.dme2.internal.jackson.map.ObjectMapper;
-
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Properties;
import junit.framework.TestCase;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class DME2ApiKeyTest extends TestCase {
- private static final Logger LOGGER = Logger.getLogger(DME2ApiKeyTest.class);
-
- protected String url;
-
- protected Properties props;
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- System.setProperty("AFT_DME2_CLIENT_SSL_INCLUDE_PROTOCOLS", "SSLv3,TLSv1,TLSv1.1");
- System.setProperty("AFT_DME2_CLIENT_IGNORE_SSL_CONFIG", "false");
- System.setProperty("AFT_DME2_CLIENT_KEYSTORE_PASSWORD", "changeit");
- this.props = LoadPropertyFile.getPropertyFileDataProducer();
- String latitude = props.getProperty("Latitude");
- String longitude = props.getProperty("Longitude");
- String version = props.getProperty("Version");
- String serviceName = props.getProperty("ServiceName");
- String env = props.getProperty("Environment");
- String partner = props.getProperty("Partner");
- String protocol = props.getProperty("Protocol");
- this.url = protocol + "://" + serviceName + "?" + "version=" + version + "&" + "envContext=" + env + "&"
- + "routeOffer=" + partner + "&partner=BOT_R";
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
- }
-
- public void testCreateKey() {
- LOGGER.info("Create Key test case initiated");
-
- ApiKeyBean apiKeyBean = new ApiKeyBean("user1@onap.com", "Creating Api Key.m");
-
- System.out.println(url);
-
- returnKey(apiKeyBean, url, props);
-
- }
-
- public String returnKey(ApiKeyBean apibean, String url, Properties props) {
-
- String reply = null;
- try {
- LOGGER.info("Call to return key ");
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(props.getProperty("MethodTypePost"));
- sender.setSubContext(props.getProperty("SubContextPathGetCreateKeys"));
- String jsonStringApiBean = new ObjectMapper().writeValueAsString(apibean);
- sender.setPayload(jsonStringApiBean);
- sender.addHeader("content-type", props.getProperty("contenttype"));
- sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
- LOGGER.info("creating ApiKey");
- reply = sender.sendAndWait(5000L);
- System.out.println("reply: " + reply);
- assertTrue(LoadPropertyFile.isValidJsonString(reply));
- LOGGER.info("response =" + reply);
-
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return reply;
- }
-
- public void testGetAllKey() {
- LOGGER.info("Test case Get All key initiated....");
- try {
- DME2Client sender = new DME2Client(new URI(this.url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(this.props.getProperty("MethodTypeGet"));
- String subcontextPath = this.props.getProperty("SubContextPathGetApiKeys");
- // sender.setSubContext(subcontextPath);
- sender.setPayload("");
- sender.addHeader("content-type", props.getProperty("contenttype"));
- sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
- LOGGER.info("Fetching all keys");
- String reply = sender.sendAndWait(5000L);
- System.out.println(reply);
- assertTrue(LoadPropertyFile.isValidJsonString(reply));
- LOGGER.info("response =" + reply);
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
-
+ private static final Logger LOGGER = LogManager.getLogger(DME2ApiKeyTest.class);
+
+ protected String url;
+
+ protected Properties props;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ System.setProperty("AFT_DME2_CLIENT_SSL_INCLUDE_PROTOCOLS", "SSLv3,TLSv1,TLSv1.1");
+ System.setProperty("AFT_DME2_CLIENT_IGNORE_SSL_CONFIG", "false");
+ System.setProperty("AFT_DME2_CLIENT_KEYSTORE_PASSWORD", "changeit");
+ this.props = LoadPropertyFile.getPropertyFileDataProducer();
+ String latitude = props.getProperty("Latitude");
+ String longitude = props.getProperty("Longitude");
+ String version = props.getProperty("Version");
+ String serviceName = props.getProperty("ServiceName");
+ String env = props.getProperty("Environment");
+ String partner = props.getProperty("Partner");
+ String protocol = props.getProperty("Protocol");
+ this.url =
+ protocol + "://" + serviceName + "?" + "version=" + version + "&" + "envContext=" + env
+ + "&"
+ + "routeOffer=" + partner + "&partner=BOT_R";
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+ }
+
+ public void testCreateKey() {
+ LOGGER.info("Create Key test case initiated");
+ ApiKeyBean apiKeyBean = new ApiKeyBean("user1@onap.com", "Creating Api Key.m");
+ System.out.println(url);
+ returnKey(apiKeyBean, url, props);
+ }
+
+ public String returnKey(ApiKeyBean apibean, String url, Properties props) {
+ String reply = null;
+ try {
+ LOGGER.info("Call to return key ");
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(props.getProperty("MethodTypePost"));
+ sender.setSubContext(props.getProperty("SubContextPathGetCreateKeys"));
+ String jsonStringApiBean = new ObjectMapper().writeValueAsString(apibean);
+ sender.setPayload(jsonStringApiBean);
+ sender.addHeader("content-type", props.getProperty("contenttype"));
+ sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
+ LOGGER.info("creating ApiKey");
+ reply = sender.sendAndWait(5000L);
+ System.out.println("reply: " + reply);
+ assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ LOGGER.info("response =" + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return reply;
+ }
+
+ public void testGetAllKey() {
+ LOGGER.info("Test case Get All key initiated....");
+ try {
+ DME2Client sender = new DME2Client(new URI(this.url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(this.props.getProperty("MethodTypeGet"));
+ String subcontextPath = this.props.getProperty("SubContextPathGetApiKeys");
+ // sender.setSubContext(subcontextPath);
+ sender.setPayload("");
+ sender.addHeader("content-type", props.getProperty("contenttype"));
+ sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
+ LOGGER.info("Fetching all keys");
+ String reply = sender.sendAndWait(5000L);
+ System.out.println(reply);
+ assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ LOGGER.info("response =" + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ConsumerFilterTest.java b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ConsumerFilterTest.java
index 59e1845..af1a43e 100644
--- a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ConsumerFilterTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ConsumerFilterTest.java
@@ -8,7 +8,7 @@
* 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.
@@ -17,80 +17,74 @@
* ============LICENSE_END=========================================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
+ *
*******************************************************************************/
package org.onap.dmaap.mr.test.dme2;
+import com.att.aft.dme2.api.DME2Client;
+import com.att.aft.dme2.api.DME2Exception;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Properties;
-
-import org.apache.log4j.Logger;
-
import junit.framework.TestCase;
-
-import com.att.aft.dme2.api.DME2Client;
-import com.att.aft.dme2.api.DME2Exception;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class DME2ConsumerFilterTest extends TestCase {
- private static final Logger LOGGER = Logger.getLogger(DME2ConsumerFilterTest.class);
-
- public void testConsumerFilter() {
- LOGGER.info("Test case consumer filter initiated");
-
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- String latitude = props.getProperty("Latitude");
- String longitude = props.getProperty("Longitude");
- String version = props.getProperty("Version");
- String serviceName = props.getProperty("ServiceName");
- String env = props.getProperty("Environment");
- String partner = props.getProperty("Partner");
- String protocol = props.getProperty("Protocol");
- String methodType = props.getProperty("MethodTypeGet");
- String user = props.getProperty("user");
- String password = props.getProperty("password");
- String contenttype = props.getProperty("contenttype");
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ private static final Logger LOGGER = LogManager.getLogger(DME2ConsumerFilterTest.class);
- try {
- // ..checking for topic exist is commented
- // if (!topicTestObj.topicExist(url, props, hm)) {
- // throw new Exception("Topic does not exist");
- // } else {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(methodType);
- String subContextPathConsumer = props.getProperty("SubContextPathConsumer") + props.getProperty("newTopic")
- + "/" + props.getProperty("group") + "/" + props.getProperty("id") + "?"
- + props.getProperty("filterType");
+ public void testConsumerFilter() {
+ LOGGER.info("Test case consumer filter initiated");
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ String latitude = props.getProperty("Latitude");
+ String longitude = props.getProperty("Longitude");
+ String version = props.getProperty("Version");
+ String serviceName = props.getProperty("ServiceName");
+ String env = props.getProperty("Environment");
+ String partner = props.getProperty("Partner");
+ String protocol = props.getProperty("Protocol");
+ String methodType = props.getProperty("MethodTypeGet");
+ String user = props.getProperty("user");
+ String password = props.getProperty("password");
+ String contenttype = props.getProperty("contenttype");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
- sender.setSubContext(URLEncoder.encode(subContextPathConsumer, "UTF-8"));
- sender.setPayload("");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(methodType);
+ String subContextPathConsumer =
+ props.getProperty("SubContextPathConsumer") + props.getProperty("newTopic")
+ + "/" + props.getProperty("group") + "/" + props.getProperty("id") + "?"
+ + props.getProperty("filterType");
- sender.addHeader("Content-Type", contenttype);
- sender.setCredentials(user, password);
- sender.setHeaders(hm);
+ sender.setSubContext(URLEncoder.encode(subContextPathConsumer, "UTF-8"));
+ sender.setPayload("");
- LOGGER.info("Consuming Message for Filter");
- String reply = sender.sendAndWait(5000L);
- assertNotNull(reply);
- LOGGER.info("Message received = " + reply);
- // }
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
+ sender.addHeader("Content-Type", contenttype);
+ sender.setCredentials(user, password);
+ sender.setHeaders(hm);
+ LOGGER.info("Consuming Message for Filter");
+ String reply = sender.sendAndWait(5000L);
+ assertNotNull(reply);
+ LOGGER.info("Message received = " + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ConsumerTest.java b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ConsumerTest.java
index b12f001..a1c449c 100644
--- a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ConsumerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ConsumerTest.java
@@ -8,7 +8,7 @@
* 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.
@@ -17,78 +17,73 @@
* ============LICENSE_END=========================================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
+ *
*******************************************************************************/
package org.onap.dmaap.mr.test.dme2;
+import com.att.aft.dme2.api.DME2Client;
+import com.att.aft.dme2.api.DME2Exception;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Properties;
-
-import org.apache.log4j.Logger;
-
import junit.framework.TestCase;
-
-import com.att.aft.dme2.api.DME2Client;
-import com.att.aft.dme2.api.DME2Exception;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class DME2ConsumerTest extends TestCase {
- private static final Logger LOGGER = Logger.getLogger(DME2ConsumerTest.class);
- public void testConsumer() {
- LOGGER.info("Test case subcribing initiated");
-
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- String latitude = props.getProperty("Latitude");
- String longitude = props.getProperty("Longitude");
- String version = props.getProperty("Version");
- String serviceName = props.getProperty("ServiceName");
- String env = props.getProperty("Environment");
- String partner = props.getProperty("Partner");
- String protocol = props.getProperty("Protocol");
- String methodType = props.getProperty("MethodTypeGet");
- String user = props.getProperty("user");
- String password = props.getProperty("password");
- String contenttype = props.getProperty("contenttype");
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
- try {
+ private static final Logger LOGGER = LogManager.getLogger(DME2ConsumerTest.class);
- // topic exist logic is commented
- // if (!topicTestObj.topicExist(url, props, hm)) {
- // throw new Exception("Topic does not exist");
- // } else {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(methodType);
- String subContextPathConsumer = props.getProperty("SubContextPathConsumer") + props.getProperty("newTopic")
- + "/" + props.getProperty("group") + "/" + props.getProperty("id");
- sender.setSubContext(subContextPathConsumer);
- sender.setPayload("");
+ public void testConsumer() {
+ LOGGER.info("Test case subcribing initiated");
- sender.addHeader("Content-Type", contenttype);
- sender.setCredentials(user, password);
- sender.setHeaders(hm);
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ String latitude = props.getProperty("Latitude");
+ String longitude = props.getProperty("Longitude");
+ String version = props.getProperty("Version");
+ String serviceName = props.getProperty("ServiceName");
+ String env = props.getProperty("Environment");
+ String partner = props.getProperty("Partner");
+ String protocol = props.getProperty("Protocol");
+ String methodType = props.getProperty("MethodTypeGet");
+ String user = props.getProperty("user");
+ String password = props.getProperty("password");
+ String contenttype = props.getProperty("contenttype");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(methodType);
+ String subContextPathConsumer =
+ props.getProperty("SubContextPathConsumer") + props.getProperty("newTopic")
+ + "/" + props.getProperty("group") + "/" + props.getProperty("id");
+ sender.setSubContext(subContextPathConsumer);
+ sender.setPayload("");
- LOGGER.info("Consuming Message");
- String reply = sender.sendAndWait(5000L);
+ sender.addHeader("Content-Type", contenttype);
+ sender.setCredentials(user, password);
+ sender.setHeaders(hm);
- assertNotNull(reply);
- LOGGER.info("Message received = " + reply);
- // }
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
+ LOGGER.info("Consuming Message");
+ String reply = sender.sendAndWait(5000L);
+ assertNotNull(reply);
+ LOGGER.info("Message received = " + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2MetricsTest.java b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2MetricsTest.java
index 35c3218..94e08bd 100644
--- a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2MetricsTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2MetricsTest.java
@@ -8,7 +8,7 @@
* 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.
@@ -17,116 +17,113 @@
* ============LICENSE_END=========================================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
+ *
*******************************************************************************/
package org.onap.dmaap.mr.test.dme2;
+import com.att.aft.dme2.api.DME2Client;
+import com.att.aft.dme2.api.DME2Exception;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Properties;
-
-import org.apache.log4j.Logger;
-
import junit.framework.TestCase;
-
-import com.att.aft.dme2.api.DME2Client;
-import com.att.aft.dme2.api.DME2Exception;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class DME2MetricsTest extends TestCase {
- private static final Logger LOGGER = Logger.getLogger(DME2MetricsTest.class);
-
- public void testGetMetrics() {
- LOGGER.info("Test case get metrics initiated...");
-
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- String latitude = props.getProperty("Latitude");
- String longitude = props.getProperty("Longitude");
- String version = props.getProperty("Version");
- String serviceName = props.getProperty("ServiceName");
- String env = props.getProperty("Environment");
- String partner = props.getProperty("Partner");
- String subContextPath = props.getProperty("SubContextPathGetMetrics");
- String protocol = props.getProperty("Protocol");
- String methodType = props.getProperty("MethodTypeGet");
- String user = props.getProperty("user");
- String password = props.getProperty("password");
- String contenttype = props.getProperty("contenttype");
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
-
- try {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(methodType);
- sender.setSubContext(subContextPath);
- sender.setPayload("");
- sender.addHeader("Content-Type", contenttype);
- sender.setCredentials(user, password);
- sender.setHeaders(hm);
-
- LOGGER.info("Getting Metrics Details");
- String reply = sender.sendAndWait(5000L);
- assertTrue(LoadPropertyFile.isValidJsonString(reply));
- LOGGER.info("response =" + reply);
-
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- public void testGetMetricsByName() {
- LOGGER.info("Test case get metrics by name initiated");
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- String latitude = props.getProperty("Latitude");
- String longitude = props.getProperty("Longitude");
- String version = props.getProperty("Version");
- String serviceName = props.getProperty("ServiceName");
- String env = props.getProperty("Environment");
- String partner = props.getProperty("Partner");
- String subContextPath = props.getProperty("SubContextPathGetMetricsByName");
- String protocol = props.getProperty("Protocol");
- String methodType = props.getProperty("MethodTypeGet");
- String user = props.getProperty("user");
- String password = props.getProperty("password");
- String contenttype = props.getProperty("contenttype");
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
- try {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(methodType);
- sender.setSubContext(subContextPath);
- sender.setPayload("");
- sender.addHeader("Content-Type", contenttype);
- sender.setCredentials(user, password);
- sender.setHeaders(hm);
+ private static final Logger LOGGER = LogManager.getLogger(DME2MetricsTest.class);
- LOGGER.info("Getting Metrics By name");
- String reply = sender.sendAndWait(5000L);
- assertTrue(LoadPropertyFile.isValidJsonString(reply));
- LOGGER.info("response =" + reply);
+ public void testGetMetrics() {
+ LOGGER.info("Test case get metrics initiated...");
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ String latitude = props.getProperty("Latitude");
+ String longitude = props.getProperty("Longitude");
+ String version = props.getProperty("Version");
+ String serviceName = props.getProperty("ServiceName");
+ String env = props.getProperty("Environment");
+ String partner = props.getProperty("Partner");
+ String subContextPath = props.getProperty("SubContextPathGetMetrics");
+ String protocol = props.getProperty("Protocol");
+ String methodType = props.getProperty("MethodTypeGet");
+ String user = props.getProperty("user");
+ String password = props.getProperty("password");
+ String contenttype = props.getProperty("contenttype");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(methodType);
+ sender.setSubContext(subContextPath);
+ sender.setPayload("");
+ sender.addHeader("Content-Type", contenttype);
+ sender.setCredentials(user, password);
+ sender.setHeaders(hm);
+ LOGGER.info("Getting Metrics Details");
+ String reply = sender.sendAndWait(5000L);
+ assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ LOGGER.info("response =" + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
+ public void testGetMetricsByName() {
+ LOGGER.info("Test case get metrics by name initiated");
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ String latitude = props.getProperty("Latitude");
+ String longitude = props.getProperty("Longitude");
+ String version = props.getProperty("Version");
+ String serviceName = props.getProperty("ServiceName");
+ String env = props.getProperty("Environment");
+ String partner = props.getProperty("Partner");
+ String subContextPath = props.getProperty("SubContextPathGetMetricsByName");
+ String protocol = props.getProperty("Protocol");
+ String methodType = props.getProperty("MethodTypeGet");
+ String user = props.getProperty("user");
+ String password = props.getProperty("password");
+ String contenttype = props.getProperty("contenttype");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(methodType);
+ sender.setSubContext(subContextPath);
+ sender.setPayload("");
+ sender.addHeader("Content-Type", contenttype);
+ sender.setCredentials(user, password);
+ sender.setHeaders(hm);
+ LOGGER.info("Getting Metrics By name");
+ String reply = sender.sendAndWait(5000L);
+ assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ LOGGER.info("response =" + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ProducerTest.java b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ProducerTest.java
index c053502..6991e35 100644
--- a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ProducerTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2ProducerTest.java
@@ -8,7 +8,7 @@
* 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.
@@ -17,84 +17,84 @@
* ============LICENSE_END=========================================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
+ *
*******************************************************************************/
package org.onap.dmaap.mr.test.dme2;
+import com.att.aft.dme2.api.DME2Client;
+import com.att.aft.dme2.api.DME2Exception;
+import com.att.aft.dme2.internal.jackson.map.ObjectMapper;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Properties;
-
-import org.apache.log4j.Logger;
-
import junit.framework.TestCase;
-
-import com.att.aft.dme2.api.DME2Client;
-import com.att.aft.dme2.api.DME2Exception;
-import com.att.aft.dme2.internal.jackson.map.ObjectMapper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class DME2ProducerTest extends TestCase {
- private static final Logger LOGGER = Logger.getLogger(DME2ProducerTest.class);
-
- public void testProducer() {
- DME2TopicTest topicTestObj = new DME2TopicTest();
-
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- String latitude = props.getProperty("Latitude");
- String longitude = props.getProperty("Longitude");
- String version = props.getProperty("Version");
- String serviceName = props.getProperty("ServiceName");
- String env = props.getProperty("Environment");
- String partner = props.getProperty("Partner");
- String protocol = props.getProperty("Protocol");
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
- // checking whether topic exist or not
- if (!topicTestObj.topicExist(url, props, hm)) {
- // if topic doesn't exist then create the topic
- topicTestObj.createTopic(url, props, hm);
- // after creating the topic publish on that topic
- publishMessage(url, props, hm);
- } else {
- // if topic already exist start publishing on the topic
- publishMessage(url, props, hm);
- }
- }
+ private static final Logger LOGGER = LogManager.getLogger(DME2ProducerTest.class);
- public void publishMessage(String url, Properties props, HashMap<String, String> mapData) {
- try {
- LOGGER.info("Call to publish message ");
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(props.getProperty("MethodTypePost"));
- String subcontextpathPublish = props.getProperty("SubContextPathproducer") + props.getProperty("newTopic");
- sender.setSubContext(subcontextpathPublish);
- String jsonStringApiBean = new ObjectMapper().writeValueAsString(new ApiKeyBean("example@att.com",
- "description"));
- sender.setPayload(jsonStringApiBean);
+ public void testProducer() {
+ DME2TopicTest topicTestObj = new DME2TopicTest();
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ String latitude = props.getProperty("Latitude");
+ String longitude = props.getProperty("Longitude");
+ String version = props.getProperty("Version");
+ String serviceName = props.getProperty("ServiceName");
+ String env = props.getProperty("Environment");
+ String partner = props.getProperty("Partner");
+ String protocol = props.getProperty("Protocol");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ // checking whether topic exist or not
+ if (!topicTestObj.topicExist(url, props, hm)) {
+ // if topic doesn't exist then create the topic
+ topicTestObj.createTopic(url, props, hm);
+ // after creating the topic publish on that topic
+ publishMessage(url, props, hm);
+ } else {
+ // if topic already exist start publishing on the topic
+ publishMessage(url, props, hm);
+ }
- sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
- sender.addHeader("content-type", props.getProperty("contenttype"));
- LOGGER.info("Publishing message");
- String reply = sender.sendAndWait(5000L);
- // assertTrue(LoadPropertyFile.isValidJsonString(reply));
- assertNotNull(reply);
- LOGGER.info("response =" + reply);
+ }
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
+ public void publishMessage(String url, Properties props, HashMap<String, String> mapData) {
+ try {
+ LOGGER.info("Call to publish message ");
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(props.getProperty("MethodTypePost"));
+ String subcontextpathPublish =
+ props.getProperty("SubContextPathproducer") + props.getProperty("newTopic");
+ sender.setSubContext(subcontextpathPublish);
+ String jsonStringApiBean = new ObjectMapper()
+ .writeValueAsString(new ApiKeyBean("example@att.com",
+ "description"));
+ sender.setPayload(jsonStringApiBean);
- }
+ sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
+ sender.addHeader("content-type", props.getProperty("contenttype"));
+ LOGGER.info("Publishing message");
+ String reply = sender.sendAndWait(5000L);
+ // assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ assertNotNull(reply);
+ LOGGER.info("response =" + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2TopicTest.java b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2TopicTest.java
index 94c507c..ec03d26 100644
--- a/src/test/java/org/onap/dmaap/mr/test/dme2/DME2TopicTest.java
+++ b/src/test/java/org/onap/dmaap/mr/test/dme2/DME2TopicTest.java
@@ -8,7 +8,7 @@
* 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.
@@ -17,529 +17,425 @@
* ============LICENSE_END=========================================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
+ *
*******************************************************************************/
package org.onap.dmaap.mr.test.dme2;
+import com.att.aft.dme2.api.DME2Client;
+import com.att.aft.dme2.api.DME2Exception;
+import com.att.aft.dme2.internal.jackson.map.ObjectMapper;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Properties;
-
-import javax.ws.rs.client.Entity;
-
-import org.apache.log4j.Logger;
-
import junit.framework.TestCase;
-
-import com.att.aft.dme2.api.DME2Client;
-import com.att.aft.dme2.api.DME2Exception;
-import com.att.aft.dme2.internal.jackson.map.ObjectMapper;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class DME2TopicTest extends TestCase {
- private String latitude;
- private String longitude;
- private String version;
- private String serviceName;
- private String env;
- private String partner;
- private String protocol;
- private String methodTypeGet;
- private String methodTypePost;
- private String methodTypeDelete;
- private String methodTypePut;
-
- private String user;
- private String password;
- private String contenttype;
- private String subContextPathGetAllTopic;
- private String subContextPathGetOneTopic;
- private String SubContextPathCreateTopic;
- private String SubContextPathGetPublisherl;
- private String SubContextPathGetPublisher;
- private String SubContextPathGetPermitPublisher;
- private String SubContextPathGetConsumer;
- private String SubContextPathGetPermitConsumer;
- private static final Logger LOGGER = Logger.getLogger(DME2TopicTest.class);
-
- public void createTopic(String url, Properties props, HashMap<String, String> mapData) {
- LOGGER.info("create topic method starts");
- if (!topicExist(url, props, mapData)) {
- LOGGER.info("creating a new topic");
- try {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(props.getProperty("MethodTypePost"));
- sender.setSubContext(props.getProperty("SubContextPathCreateTopic"));
- TopicBeanDME2 topicBean = new TopicBeanDME2(props.getProperty("newTopic"),
- props.getProperty("topicDescription"), Integer.parseInt(props.getProperty("partition")),
- Integer.parseInt(props.getProperty("replication")), Boolean.valueOf(props
- .getProperty("txenabled")));
- String jsonStringApiBean = new ObjectMapper().writeValueAsString(topicBean);
- sender.setPayload(jsonStringApiBean);
- sender.addHeader("content-type", props.getProperty("contenttype"));
- sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
-
- LOGGER.info("creating Topic");
- String reply = sender.sendAndWait(5000L);
- assertTrue(LoadPropertyFile.isValidJsonString(reply));
- LOGGER.info("response =" + reply);
-
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- public boolean topicExist(String url, Properties props, HashMap<String, String> mapData) {
- boolean topicExist = false;
- try {
- LOGGER.info("Checking topic exists or not");
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(props.getProperty("MethodTypeGet"));
- String subcontextPath = props.getProperty("subContextPathGetOneTopic") + props.getProperty("newTopic");
- sender.setSubContext(subcontextPath);
- sender.setPayload("");
- sender.addHeader("content-type", props.getProperty("contenttype"));
- sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
- String reply = sender.sendAndWait(5000L);
- topicExist = LoadPropertyFile.isValidJsonString(reply);
- LOGGER.info("Topic exist =" + topicExist);
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return topicExist;
- }
-
- public void testAllTopics() {
- LOGGER.info("Test case get all topics initiated");
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- latitude = props.getProperty("Latitude");
- longitude = props.getProperty("Longitude");
- version = props.getProperty("Version");
- serviceName = props.getProperty("ServiceName");
- env = props.getProperty("Environment");
- partner = props.getProperty("Partner");
- subContextPathGetAllTopic = props.getProperty("subContextPathGetAllTopic");
- protocol = props.getProperty("Protocol");
- methodTypeGet = props.getProperty("MethodTypeGet");
- user = props.getProperty("user");
- password = props.getProperty("password");
- contenttype = props.getProperty("contenttype");
-
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude); // } else {
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
-
- try {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(methodTypeGet);
- sender.setSubContext(subContextPathGetAllTopic);
- sender.setPayload("");
-
- sender.addHeader("Content-Type", contenttype);
- sender.setCredentials(user, password);
- sender.setHeaders(hm);
-
- LOGGER.info("Retrieving all topics");
- String reply = sender.sendAndWait(5000L);
- assertTrue(LoadPropertyFile.isValidJsonString(reply));
- LOGGER.info("All Topics details = " + reply);
-
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void testOneTopic() {
- LOGGER.info("Test case get one topic initiated");
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- latitude = props.getProperty("Latitude");
- longitude = props.getProperty("Longitude");
- version = props.getProperty("Version");
- serviceName = props.getProperty("ServiceName");
- env = props.getProperty("Environment");
- partner = props.getProperty("Partner");
- subContextPathGetOneTopic = props.getProperty("subContextPathGetOneTopic");
- protocol = props.getProperty("Protocol");
- methodTypeGet = props.getProperty("MethodTypeGet");
- user = props.getProperty("user");
- password = props.getProperty("password");
- contenttype = props.getProperty("contenttype");
-
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
-
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
- System.out.println("Retrieving topic detail");
- if (!topicExist(url, props, hm)) {
- createTopic(url, props, hm);
- } else {
- assertTrue(true);
- }
- }
-
- public void createTopicForDeletion(String url, Properties props, HashMap<String, String> mapData) {
- LOGGER.info("create topic method starts");
-
- LOGGER.info("creating a new topic for deletion");
- try {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(props.getProperty("MethodTypePost"));
- sender.setSubContext(props.getProperty("SubContextPathCreateTopic"));
- TopicBeanDME2 topicBean = new TopicBeanDME2(props.getProperty("deleteTopic"),
- props.getProperty("topicDescription"), Integer.parseInt(props.getProperty("partition")),
- Integer.parseInt(props.getProperty("replication")), Boolean.valueOf(props.getProperty("txenabled")));
- String jsonStringApiBean = new ObjectMapper().writeValueAsString(topicBean);
- sender.setPayload(jsonStringApiBean);
- sender.addHeader("content-type", props.getProperty("contenttype"));
- sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
-
- LOGGER.info("creating Topic");
- String reply = sender.sendAndWait(5000L);
- assertTrue(LoadPropertyFile.isValidJsonString(reply));
- LOGGER.info("response =" + reply);
-
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- }
-
- public boolean topicExistForDeletion(String url, Properties props, HashMap<String, String> mapData) {
- boolean topicExist = false;
- try {
- LOGGER.info("Checking topic exists for deletion");
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(props.getProperty("MethodTypeGet"));
- String subcontextPath = props.getProperty("subContextPathGetOneTopic") + props.getProperty("deleteTopic");
- sender.setSubContext(subcontextPath);
- sender.setPayload("");
- sender.addHeader("content-type", props.getProperty("contenttype"));
- sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
- String reply = sender.sendAndWait(5000L);
- topicExist = LoadPropertyFile.isValidJsonString(reply);
- LOGGER.info("Topic exist for deletion=" + topicExist);
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return topicExist;
- }
-
- public void testDeleteTopic() {
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- latitude = props.getProperty("Latitude");
- longitude = props.getProperty("Longitude");
- version = props.getProperty("Version");
- serviceName = props.getProperty("ServiceName");
- env = props.getProperty("Environment");
- partner = props.getProperty("Partner");
- SubContextPathCreateTopic = props.getProperty("SubContextPathCreateTopic");
- protocol = props.getProperty("Protocol");
- methodTypePost = props.getProperty("MethodTypeDelete");
- user = props.getProperty("user");
- password = props.getProperty("password");
- contenttype = props.getProperty("contenttypejson");
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
- System.out.println("deleteing topic");
- if (!topicExistForDeletion(url, props, hm)) {
- createTopicForDeletion(url, props, hm);
- deleteTopic(url, props, hm);
- } else {
- deleteTopic(url, props, hm);
- }
- }
-
- public void deleteTopic(String url, Properties props, HashMap<String, String> mapData) {
- try {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(props.getProperty("MethodTypeDelete"));
- String subsontextPathDelete = props.getProperty("subContextPathGetOneTopic")
- + props.getProperty("deleteTopic");
- sender.setSubContext(subsontextPathDelete);
- sender.setPayload("");
- sender.addHeader("content-type", props.getProperty("contenttype"));
- sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
- System.out.println("Deleting Topic " + props.getProperty("deleteTopic"));
- String reply = sender.sendAndWait(5000L);
- assertNotNull(reply);
- System.out.println("response =" + reply);
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void testGetProducersTopics() {
- LOGGER.info("Test case get list of producers on topic");
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- latitude = props.getProperty("Latitude");
- longitude = props.getProperty("Longitude");
- version = props.getProperty("Version");
- serviceName = props.getProperty("ServiceName");
- env = props.getProperty("Environment");
- partner = props.getProperty("Partner");
- SubContextPathGetPublisher = props.getProperty("SubContextPathGetPublisher");
- protocol = props.getProperty("Protocol");
- methodTypeGet = props.getProperty("MethodTypeGet");
- user = props.getProperty("user");
- password = props.getProperty("password");
- contenttype = props.getProperty("contenttype");
-
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
-
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
-
- try {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(methodTypeGet);
- sender.setSubContext(SubContextPathGetPublisher);
- sender.setPayload("");
-
- sender.addHeader("Content-Type", contenttype);
- sender.setCredentials(user, password);
- sender.setHeaders(hm);
-
- LOGGER.info("Retrieving List of publishers");
- String reply = sender.sendAndWait(5000L);
- assertTrue(LoadPropertyFile.isValidJsonString(reply));
- LOGGER.info("All Publishers details = " + reply);
-
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- // permitting a producer on topic is not applicable
- // public void testPermitProducersTopics() {
- // LOGGER.info("Test case ");
- // Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- // latitude = props.getProperty("Latitude");
- // longitude = props.getProperty("Longitude");
- // version = props.getProperty("Version");
- // serviceName = props.getProperty("ServiceName");
- // env = props.getProperty("Environment");
- // partner = props.getProperty("Partner");
- // SubContextPathGetPermitPublisher =
- // props.getProperty("SubContextPathGetPermitPublisher");
- // protocol = props.getProperty("Protocol");
- // methodTypePut = props.getProperty("MethodTypePut");
- // user = props.getProperty("user");
- // password = props.getProperty("password");
- // contenttype = props.getProperty("contenttype");
- //
- // String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/"
- // + "version=" + version + "/"
- // + "envContext=" + env + "/" + "partner=" + partner;
- // LoadPropertyFile.loadAFTProperties(latitude, longitude);
- //
- // HashMap<String, String> hm = new HashMap<String, String>();
- // hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- // hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- // hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
- //
- // try {
- // DME2Client sender = new DME2Client(new URI(url), 5000L);
- // sender.setAllowAllHttpReturnCodes(true);
- // sender.setMethod(methodTypePut);
- // sender.setSubContext(SubContextPathGetPermitPublisher);
- // sender.setPayload("");
- //
- // sender.addHeader("Content-Type", contenttype);
- // sender.setCredentials(user, password);
- // sender.setHeaders(hm);
- //
- // System.out.println("Permitting a producer on topic");
- // String reply = sender.sendAndWait(5000L);
- // System.out.println("Reply from server = " + reply);
- //
- // } catch (DME2Exception e) {
- // e.printStackTrace();
- // } catch (URISyntaxException e) {
- // e.printStackTrace();
- // } catch (Exception e) {
- // e.printStackTrace();
- // }
- // }
-
- public void testGetConsumersTopics() {
- LOGGER.info("Test case get list of consumers on topic ");
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- latitude = props.getProperty("Latitude");
- longitude = props.getProperty("Longitude");
- version = props.getProperty("Version");
- serviceName = props.getProperty("ServiceName");
- env = props.getProperty("Environment");
- partner = props.getProperty("Partner");
- SubContextPathGetConsumer = props.getProperty("SubContextPathGetConsumer");
- protocol = props.getProperty("Protocol");
- methodTypeGet = props.getProperty("MethodTypeGet");
- user = props.getProperty("user");
- password = props.getProperty("password");
- contenttype = props.getProperty("contenttype");
-
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
-
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
-
- try {
- DME2Client sender = new DME2Client(new URI(url), 5000L);
- sender.setAllowAllHttpReturnCodes(true);
- sender.setMethod(methodTypeGet);
- sender.setSubContext(SubContextPathGetConsumer);
- sender.setPayload("");
-
- sender.addHeader("Content-Type", contenttype);
- sender.setCredentials(user, password);
- sender.setHeaders(hm);
-
- LOGGER.info("Retrieving consumer details on topics");
- String reply = sender.sendAndWait(5000L);
- assertTrue(LoadPropertyFile.isValidJsonString(reply));
- System.out.println("Reply from server = " + reply);
-
- } catch (DME2Exception e) {
- e.printStackTrace();
- } catch (URISyntaxException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public void testCreateTopic() {
- LOGGER.info("Test case create topic starts");
- Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- latitude = props.getProperty("Latitude");
- longitude = props.getProperty("Longitude");
- version = props.getProperty("Version");
- serviceName = props.getProperty("ServiceName");
- env = props.getProperty("Environment");
- partner = props.getProperty("Partner");
- SubContextPathCreateTopic = props.getProperty("SubContextPathCreateTopic");
- protocol = props.getProperty("Protocol");
- methodTypePost = props.getProperty("MethodTypePost");
- user = props.getProperty("user");
- password = props.getProperty("password");
- contenttype = props.getProperty("contenttypejson");
-
- String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version + "/"
- + "envContext=" + env + "/" + "partner=" + partner;
- LoadPropertyFile.loadAFTProperties(latitude, longitude);
- HashMap<String, String> hm = new HashMap<String, String>();
- hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
-
- createTopic(url, props, hm);
- }
- // permitting a consumer on topic is not applicable
- // public void testPermitConsumerTopics() {
- // Properties props = LoadPropertyFile.getPropertyFileDataProducer();
- // latitude = props.getProperty("Latitude");
- // longitude = props.getProperty("Longitude");
- // version = props.getProperty("Version");
- // serviceName = props.getProperty("ServiceName");
- // env = props.getProperty("Environment");
- // partner = props.getProperty("Partner");
- // SubContextPathGetPermitConsumer =
- // props.getProperty("SubContextPathGetPermitConsumer");
- // protocol = props.getProperty("Protocol");
- // methodTypePut = props.getProperty("MethodTypePut");
- // user = props.getProperty("user");
- // password = props.getProperty("password");
- // contenttype = props.getProperty("contenttype");
- //
- // String url = protocol + "://DME2SEARCH/" + "service=" + serviceName + "/"
- // + "version=" + version + "/"
- // + "envContext=" + env + "/" + "partner=" + partner;
- // LoadPropertyFile.loadAFTProperties(latitude, longitude);
- //
- // HashMap<String, String> hm = new HashMap<String, String>();
- // hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
- // hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
- // hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
- //
- // try {
- // DME2Client sender = new DME2Client(new URI(url), 5000L);
- // sender.setAllowAllHttpReturnCodes(true);
- // sender.setMethod(methodTypePut);
- // sender.setSubContext(SubContextPathGetPermitConsumer);
- // sender.setPayload("");
- //
- // sender.addHeader("Content-Type", contenttype);
- // sender.setCredentials(user, password);
- // sender.setHeaders(hm);
- //
- // System.out.println("Permitting a consumer on topic");
- // String reply = sender.sendAndWait(5000L);
- // assertNotNull(reply);
- // System.out.println("Reply from server = " + reply);
- //
- // } catch (DME2Exception e) {
- // e.printStackTrace();
- // } catch (URISyntaxException e) {
- // e.printStackTrace();
- // } catch (Exception e) {
- // e.printStackTrace();
- // }
- // }
+ private String latitude;
+ private String longitude;
+ private String version;
+ private String serviceName;
+ private String env;
+ private String partner;
+ private String protocol;
+ private String methodTypeGet;
+ private String methodTypePost;
+ private String methodTypeDelete;
+ private String methodTypePut;
+
+ private String user;
+ private String password;
+ private String contenttype;
+ private String subContextPathGetAllTopic;
+ private String subContextPathGetOneTopic;
+ private String SubContextPathCreateTopic;
+ private String SubContextPathGetPublisherl;
+ private String SubContextPathGetPublisher;
+ private String SubContextPathGetPermitPublisher;
+ private String SubContextPathGetConsumer;
+ private String SubContextPathGetPermitConsumer;
+ private static final Logger LOGGER = LogManager.getLogger(DME2TopicTest.class);
+
+ public void createTopic(String url, Properties props, HashMap<String, String> mapData) {
+ LOGGER.info("create topic method starts");
+ if (!topicExist(url, props, mapData)) {
+ LOGGER.info("creating a new topic");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(props.getProperty("MethodTypePost"));
+ sender.setSubContext(props.getProperty("SubContextPathCreateTopic"));
+ TopicBeanDME2 topicBean = new TopicBeanDME2(props.getProperty("newTopic"),
+ props.getProperty("topicDescription"),
+ Integer.parseInt(props.getProperty("partition")),
+ Integer.parseInt(props.getProperty("replication")), Boolean.valueOf(props
+ .getProperty("txenabled")));
+ String jsonStringApiBean = new ObjectMapper().writeValueAsString(topicBean);
+ sender.setPayload(jsonStringApiBean);
+ sender.addHeader("content-type", props.getProperty("contenttype"));
+ sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
+ LOGGER.info("creating Topic");
+ String reply = sender.sendAndWait(5000L);
+ assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ LOGGER.info("response =" + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public boolean topicExist(String url, Properties props, HashMap<String, String> mapData) {
+ boolean topicExist = false;
+ try {
+ LOGGER.info("Checking topic exists or not");
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(props.getProperty("MethodTypeGet"));
+ String subcontextPath =
+ props.getProperty("subContextPathGetOneTopic") + props.getProperty("newTopic");
+ sender.setSubContext(subcontextPath);
+ sender.setPayload("");
+ sender.addHeader("content-type", props.getProperty("contenttype"));
+ sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
+ String reply = sender.sendAndWait(5000L);
+ topicExist = LoadPropertyFile.isValidJsonString(reply);
+ LOGGER.info("Topic exist =" + topicExist);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return topicExist;
+ }
+
+ public void testAllTopics() {
+ LOGGER.info("Test case get all topics initiated");
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ latitude = props.getProperty("Latitude");
+ longitude = props.getProperty("Longitude");
+ version = props.getProperty("Version");
+ serviceName = props.getProperty("ServiceName");
+ env = props.getProperty("Environment");
+ partner = props.getProperty("Partner");
+ subContextPathGetAllTopic = props.getProperty("subContextPathGetAllTopic");
+ protocol = props.getProperty("Protocol");
+ methodTypeGet = props.getProperty("MethodTypeGet");
+ user = props.getProperty("user");
+ password = props.getProperty("password");
+ contenttype = props.getProperty("contenttype");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude); // } else {
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(methodTypeGet);
+ sender.setSubContext(subContextPathGetAllTopic);
+ sender.setPayload("");
+
+ sender.addHeader("Content-Type", contenttype);
+ sender.setCredentials(user, password);
+ sender.setHeaders(hm);
+
+ LOGGER.info("Retrieving all topics");
+ String reply = sender.sendAndWait(5000L);
+ assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ LOGGER.info("All Topics details = " + reply);
+
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testOneTopic() {
+ LOGGER.info("Test case get one topic initiated");
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ latitude = props.getProperty("Latitude");
+ longitude = props.getProperty("Longitude");
+ version = props.getProperty("Version");
+ serviceName = props.getProperty("ServiceName");
+ env = props.getProperty("Environment");
+ partner = props.getProperty("Partner");
+ subContextPathGetOneTopic = props.getProperty("subContextPathGetOneTopic");
+ protocol = props.getProperty("Protocol");
+ methodTypeGet = props.getProperty("MethodTypeGet");
+ user = props.getProperty("user");
+ password = props.getProperty("password");
+ contenttype = props.getProperty("contenttype");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ System.out.println("Retrieving topic detail");
+ if (!topicExist(url, props, hm)) {
+ createTopic(url, props, hm);
+ } else {
+ assertTrue(true);
+ }
+ }
+
+ public void createTopicForDeletion(String url, Properties props,
+ HashMap<String, String> mapData) {
+ LOGGER.info("create topic method starts");
+ LOGGER.info("creating a new topic for deletion");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(props.getProperty("MethodTypePost"));
+ sender.setSubContext(props.getProperty("SubContextPathCreateTopic"));
+ TopicBeanDME2 topicBean = new TopicBeanDME2(props.getProperty("deleteTopic"),
+ props.getProperty("topicDescription"),
+ Integer.parseInt(props.getProperty("partition")),
+ Integer.parseInt(props.getProperty("replication")),
+ Boolean.valueOf(props.getProperty("txenabled")));
+ String jsonStringApiBean = new ObjectMapper().writeValueAsString(topicBean);
+ sender.setPayload(jsonStringApiBean);
+ sender.addHeader("content-type", props.getProperty("contenttype"));
+ sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
+
+ LOGGER.info("creating Topic");
+ String reply = sender.sendAndWait(5000L);
+ assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ LOGGER.info("response =" + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public boolean topicExistForDeletion(String url, Properties props,
+ HashMap<String, String> mapData) {
+ boolean topicExist = false;
+ try {
+ LOGGER.info("Checking topic exists for deletion");
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(props.getProperty("MethodTypeGet"));
+ String subcontextPath =
+ props.getProperty("subContextPathGetOneTopic") + props.getProperty("deleteTopic");
+ sender.setSubContext(subcontextPath);
+ sender.setPayload("");
+ sender.addHeader("content-type", props.getProperty("contenttype"));
+ sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
+ String reply = sender.sendAndWait(5000L);
+ topicExist = LoadPropertyFile.isValidJsonString(reply);
+ LOGGER.info("Topic exist for deletion=" + topicExist);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return topicExist;
+ }
+
+ public void testDeleteTopic() {
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ latitude = props.getProperty("Latitude");
+ longitude = props.getProperty("Longitude");
+ version = props.getProperty("Version");
+ serviceName = props.getProperty("ServiceName");
+ env = props.getProperty("Environment");
+ partner = props.getProperty("Partner");
+ SubContextPathCreateTopic = props.getProperty("SubContextPathCreateTopic");
+ protocol = props.getProperty("Protocol");
+ methodTypePost = props.getProperty("MethodTypeDelete");
+ user = props.getProperty("user");
+ password = props.getProperty("password");
+ contenttype = props.getProperty("contenttypejson");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ System.out.println("deleteing topic");
+ if (!topicExistForDeletion(url, props, hm)) {
+ createTopicForDeletion(url, props, hm);
+ deleteTopic(url, props, hm);
+ } else {
+ deleteTopic(url, props, hm);
+ }
+ }
+
+ public void deleteTopic(String url, Properties props, HashMap<String, String> mapData) {
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(props.getProperty("MethodTypeDelete"));
+ String subsontextPathDelete = props.getProperty("subContextPathGetOneTopic")
+ + props.getProperty("deleteTopic");
+ sender.setSubContext(subsontextPathDelete);
+ sender.setPayload("");
+ sender.addHeader("content-type", props.getProperty("contenttype"));
+ sender.setCredentials(props.getProperty("user"), props.getProperty("password"));
+ System.out.println("Deleting Topic " + props.getProperty("deleteTopic"));
+ String reply = sender.sendAndWait(5000L);
+ assertNotNull(reply);
+ System.out.println("response =" + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testGetProducersTopics() {
+ LOGGER.info("Test case get list of producers on topic");
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ latitude = props.getProperty("Latitude");
+ longitude = props.getProperty("Longitude");
+ version = props.getProperty("Version");
+ serviceName = props.getProperty("ServiceName");
+ env = props.getProperty("Environment");
+ partner = props.getProperty("Partner");
+ SubContextPathGetPublisher = props.getProperty("SubContextPathGetPublisher");
+ protocol = props.getProperty("Protocol");
+ methodTypeGet = props.getProperty("MethodTypeGet");
+ user = props.getProperty("user");
+ password = props.getProperty("password");
+ contenttype = props.getProperty("contenttype");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(methodTypeGet);
+ sender.setSubContext(SubContextPathGetPublisher);
+ sender.setPayload("");
+
+ sender.addHeader("Content-Type", contenttype);
+ sender.setCredentials(user, password);
+ sender.setHeaders(hm);
+
+ LOGGER.info("Retrieving List of publishers");
+ String reply = sender.sendAndWait(5000L);
+ assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ LOGGER.info("All Publishers details = " + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testGetConsumersTopics() {
+ LOGGER.info("Test case get list of consumers on topic ");
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ latitude = props.getProperty("Latitude");
+ longitude = props.getProperty("Longitude");
+ version = props.getProperty("Version");
+ serviceName = props.getProperty("ServiceName");
+ env = props.getProperty("Environment");
+ partner = props.getProperty("Partner");
+ SubContextPathGetConsumer = props.getProperty("SubContextPathGetConsumer");
+ protocol = props.getProperty("Protocol");
+ methodTypeGet = props.getProperty("MethodTypeGet");
+ user = props.getProperty("user");
+ password = props.getProperty("password");
+ contenttype = props.getProperty("contenttype");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ try {
+ DME2Client sender = new DME2Client(new URI(url), 5000L);
+ sender.setAllowAllHttpReturnCodes(true);
+ sender.setMethod(methodTypeGet);
+ sender.setSubContext(SubContextPathGetConsumer);
+ sender.setPayload("");
+
+ sender.addHeader("Content-Type", contenttype);
+ sender.setCredentials(user, password);
+ sender.setHeaders(hm);
+
+ LOGGER.info("Retrieving consumer details on topics");
+ String reply = sender.sendAndWait(5000L);
+ assertTrue(LoadPropertyFile.isValidJsonString(reply));
+ System.out.println("Reply from server = " + reply);
+ } catch (DME2Exception e) {
+ e.printStackTrace();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testCreateTopic() {
+ LOGGER.info("Test case create topic starts");
+ Properties props = LoadPropertyFile.getPropertyFileDataProducer();
+ latitude = props.getProperty("Latitude");
+ longitude = props.getProperty("Longitude");
+ version = props.getProperty("Version");
+ serviceName = props.getProperty("ServiceName");
+ env = props.getProperty("Environment");
+ partner = props.getProperty("Partner");
+ SubContextPathCreateTopic = props.getProperty("SubContextPathCreateTopic");
+ protocol = props.getProperty("Protocol");
+ methodTypePost = props.getProperty("MethodTypePost");
+ user = props.getProperty("user");
+ password = props.getProperty("password");
+ contenttype = props.getProperty("contenttypejson");
+ String url =
+ protocol + "://DME2SEARCH/" + "service=" + serviceName + "/" + "version=" + version
+ + "/"
+ + "envContext=" + env + "/" + "partner=" + partner;
+ LoadPropertyFile.loadAFTProperties(latitude, longitude);
+ HashMap<String, String> hm = new HashMap<String, String>();
+ hm.put("AFT_DME2_EP_READ_TIMEOUT_MS", "50000");
+ hm.put("AFT_DME2_ROUNDTRIP_TIMEOUT_MS", "240000");
+ hm.put("AFT_DME2_EP_CONN_TIMEOUT", "5000");
+ createTopic(url, props, hm);
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/test/dme2/JUnitTestSuite.java b/src/test/java/org/onap/dmaap/mr/test/dme2/JUnitTestSuite.java
index 163d3c1..bab1be3 100644
--- a/src/test/java/org/onap/dmaap/mr/test/dme2/JUnitTestSuite.java
+++ b/src/test/java/org/onap/dmaap/mr/test/dme2/JUnitTestSuite.java
@@ -8,7 +8,7 @@
* 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.
@@ -17,28 +17,28 @@
* ============LICENSE_END=========================================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
+ *
*******************************************************************************/
package org.onap.dmaap.mr.test.dme2;
import junit.framework.TestSuite;
-
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
-import org.apache.log4j.Logger;
@RunWith(Suite.class)
-@SuiteClasses({ DME2AdminTest.class, DME2ApiKeyTest.class, DME2ConsumerTest.class, DME2ConsumerTest.class,
- DME2MetricsTest.class, DME2ProducerTest.class, DME2TopicTest.class, })
+@SuiteClasses({DME2AdminTest.class, DME2ApiKeyTest.class, DME2ConsumerTest.class,
+ DME2ConsumerTest.class, DME2MetricsTest.class, DME2ProducerTest.class, DME2TopicTest.class,})
public class JUnitTestSuite {
- private static final Logger LOGGER = Logger.getLogger(JUnitTestSuite.class);
- public static void main(String[] args) {
- LOGGER.info("Running the test suite");
-
- TestSuite tstSuite = new TestSuite();
- LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
- }
+ private static final Logger LOGGER = LogManager.getLogger(JUnitTestSuite.class);
+
+ public static void main(String[] args) {
+ LOGGER.info("Running the test suite");
+ TestSuite tstSuite = new TestSuite();
+ LOGGER.info("Total Test Counts " + tstSuite.countTestCases());
+ }
}
diff --git a/src/test/java/org/onap/dmaap/mr/test/dme2/TestRunner.java b/src/test/java/org/onap/dmaap/mr/test/dme2/TestRunner.java
index f8696f4..5e6e1c3 100644
--- a/src/test/java/org/onap/dmaap/mr/test/dme2/TestRunner.java
+++ b/src/test/java/org/onap/dmaap/mr/test/dme2/TestRunner.java
@@ -8,7 +8,7 @@
* 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.
@@ -17,26 +17,26 @@
* ============LICENSE_END=========================================================
*
* ECOMP is a trademark and service mark of AT&T Intellectual Property.
- *
+ *
*******************************************************************************/
package org.onap.dmaap.mr.test.dme2;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
-import org.apache.log4j.Logger;
public class TestRunner {
- private static final Logger LOGGER = Logger.getLogger(TestRunner.class);
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Result result = JUnitCore.runClasses(JUnitTestSuite.class);
- for (Failure failure : result.getFailures()) {
- LOGGER.info(failure.toString());
-
- }
- LOGGER.info(result.wasSuccessful());
- }
+ private static final Logger LOGGER = LogManager.getLogger(TestRunner.class);
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+ Result result = JUnitCore.runClasses(JUnitTestSuite.class);
+ for (Failure failure : result.getFailures()) {
+ LOGGER.info(failure.toString());
+ }
+ LOGGER.info(result.wasSuccessful());
+ }
}