Merge branch 'master' of https://github.com/wso2/product-iot-server into add-emm-analytics

application-manager-new
charitha 7 years ago
commit 6ac1296eeb

@ -70,9 +70,6 @@
<exclude>**/master-datasources.xml</exclude>
<exclude>**/carbon.xml</exclude>
<exclude>**/registry.xml</exclude>
<exclude>**/client-truststore.jks</exclude>
<exclude>**/wso2carbon.jks</exclude>
<exclude>**/wso2carbon.jks</exclude>
<exclude>**/WSO2AM_DB.h2.db</exclude>
<exclude>**/WSO2DM_DB.h2.db</exclude>
<exclude>**/lib/httpmime*</exclude>
@ -253,8 +250,6 @@
<exclude>**/synapse-configs/**</exclude>
<exclude>**/web-apps/**</exclude>
<exclude>**/appm-tenant-conf.xml</exclude>
<exclude>**/client-truststore.jks</exclude>
<exclude>**/wso2carbon.jks</exclude>
</excludes>
</fileSet>
@ -326,10 +321,6 @@
</directory>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/resources
</outputDirectory>
<excludes>
<exclude>**/client-truststore.jks</exclude>
<exclude>**/wso2carbon.jks</exclude>
</excludes>
</fileSet>
<!-- Copying device type deployer files -->
@ -697,8 +688,6 @@
<exclude>**/LICENSE.txt</exclude>
<exclude>**/release-notes.html</exclude>
<exclude>**/webapp-mode/WEB-INF/web.xml</exclude>
<exclude>**/repository/resources/security/client-truststore.jks</exclude>
<exclude>**/repository/resources/security/wso2carbon.jks</exclude>
</excludes>
</fileSet>
@ -995,8 +984,6 @@
<exclude>**/LICENSE.txt</exclude>
<exclude>**/release-notes.html</exclude>
<exclude>**/dbscripts</exclude>
<exclude>**/repository/resources/security/client-truststore.jks</exclude>
<exclude>**/repository/resources/security/wso2carbon.jks</exclude>
</excludes>
</fileSet>
@ -1986,38 +1973,5 @@
<fileMode>644</fileMode>
</file>
<!-- ********************************* End of Broker Profile ********************************* -->
<!--Start - Need to remove after kernel 4.4.17 release-->
<file>
<source>src/core/resources/security/client-truststore.jks</source>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/resources/security</outputDirectory>
<fileMode>644</fileMode>
</file>
<file>
<source>src/core/resources/security/client-truststore.jks</source>
<outputDirectory>${pom.artifactId}-${pom.version}/wso2/analytics/repository/resources/security</outputDirectory>
<fileMode>644</fileMode>
</file>
<file>
<source>src/core/resources/security/client-truststore.jks</source>
<outputDirectory>${pom.artifactId}-${pom.version}/wso2/broker/repository/resources/security</outputDirectory>
<fileMode>644</fileMode>
</file>
<file>
<source>src/core/resources/security/wso2carbon.jks</source>
<outputDirectory>${pom.artifactId}-${pom.version}/repository/resources/security</outputDirectory>
<fileMode>644</fileMode>
</file>
<file>
<source>src/core/resources/security/wso2carbon.jks</source>
<outputDirectory>${pom.artifactId}-${pom.version}/wso2/analytics/repository/resources/security</outputDirectory>
<fileMode>644</fileMode>
</file>
<file>
<source>src/core/resources/security/wso2carbon.jks</source>
<outputDirectory>${pom.artifactId}-${pom.version}/wso2/broker/repository/resources/security</outputDirectory>
<fileMode>644</fileMode>
</file>
<!--End-->
</files>
</assembly>

@ -18,6 +18,9 @@
package org.wso2.iot.integration.common.extensions;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.filefilter.DirectoryFileFilter;
import org.apache.commons.io.filefilter.RegexFileFilter;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -36,6 +39,7 @@ import org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader;
import javax.xml.xpath.XPathExpressionException;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
@ -57,6 +61,7 @@ public class CarbonServerManagerExtension {
private static final String CMD_ARG = "cmdArg";
private static int defaultHttpPort = Integer.parseInt("9763");
private static int defaultHttpsPort = Integer.parseInt("9443");
private static final long COVERAGE_DUMP_WAIT_TIME = 30000;
public CarbonServerManagerExtension(AutomationContext context) {
this.automationContext = context;
@ -246,6 +251,7 @@ public class CarbonServerManagerExtension {
}
private void generateCoverageReport(File classesDir) throws IOException, AutomationFrameworkException {
checkJacocoDataFileSizes(FrameworkPathUtil.getJacocoCoverageHome());
CodeCoverageUtils.executeMerge(FrameworkPathUtil.getJacocoCoverageHome(), FrameworkPathUtil.getCoverageMergeFilePath());
ReportGenerator reportGenerator = new ReportGenerator(new File(FrameworkPathUtil.getCoverageMergeFilePath()), classesDir, new File(CodeCoverageUtils.getJacocoReportDirectory()), (File)null);
reportGenerator.create();
@ -374,4 +380,48 @@ public class CarbonServerManagerExtension {
}
}
/**
* To check jacoco file sizes and wait for them to get created..
*
* @param filePath File Path of the jacoco data files.
*/
private void checkJacocoDataFileSizes(String filePath) {
Collection<File> fileSetsCollection = FileUtils
.listFiles(new File(filePath), new RegexFileFilter("[^s]+(." + "(?i)(exec))$"),
DirectoryFileFilter.DIRECTORY);
for (File inputFile : fileSetsCollection) {
if (inputFile.isDirectory()) {
continue;
}
//retry to check whether exec data file is non empty.
waitForCoverageDumpFileCreation(inputFile);
}
}
/**
* This is to wait for jacoco exe file creation.
*
* @param file File that need to be created.
*/
private void waitForCoverageDumpFileCreation(File file) {
long currentTime = System.currentTimeMillis();
long waitTime = currentTime + COVERAGE_DUMP_WAIT_TIME;
while (waitTime > System.currentTimeMillis()) {
if (file.length() > 0) {
log.info("Execution data file non empty file size in KB : " + file.length() / 1024);
break;
} else {
try {
log.warn("Execution data file is empty file size in KB : " + file.length() / 1024);
Thread.sleep(500);
} catch (InterruptedException ignored) {
log.warn("Sleep interrupted ", ignored);
}
}
}
}
}

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="Carbon Product" uid="carbon.product.id" id="carbon.product" application="carbon.application" version="4.4.16" useFeatures="true" includeLaunchers="true">
<product name="Carbon Product" uid="carbon.product.id" id="carbon.product" application="carbon.application" version="4.4.17" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
@ -13,7 +13,7 @@
</plugins>
<features>
<feature id="org.wso2.carbon.core.runtime" version="4.4.16"/>
<feature id="org.wso2.carbon.core.runtime" version="4.4.17"/>
</features>
<configurations>

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="Carbon Product" uid="carbon.product.id" id="carbon.product" application="carbon.application" version="4.4.16" useFeatures="true" includeLaunchers="true">
<product name="Carbon Product" uid="carbon.product.id" id="carbon.product" application="carbon.application" version="4.4.17" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
@ -13,7 +13,7 @@
</plugins>
<features>
<feature id="org.wso2.carbon.core.runtime" version="4.4.16"/>
<feature id="org.wso2.carbon.core.runtime" version="4.4.17"/>
</features>
<configurations>

@ -2,7 +2,7 @@
<?pde version="3.5"?>
<product name="Carbon Product" uid="carbon.product.id" id="carbon.product" application="carbon.application"
version="4.4.16" useFeatures="true" includeLaunchers="true">
version="4.4.17" useFeatures="true" includeLaunchers="true">
<configIni use="default">
</configIni>
@ -14,7 +14,7 @@ version="4.4.16" useFeatures="true" includeLaunchers="true">
</plugins>
<features>
<feature id="org.wso2.carbon.core.runtime" version="4.4.16"/>
<feature id="org.wso2.carbon.core.runtime" version="4.4.17"/>
</features>
<configurations>

@ -31,7 +31,7 @@
<parent>
<groupId>org.wso2</groupId>
<artifactId>wso2</artifactId>
<version>1</version>
<version>2</version>
</parent>
<modules>
@ -1446,7 +1446,7 @@
<properties>
<!--Carbon kernel versions-->
<carbon.kernel.version>4.4.16</carbon.kernel.version>
<carbon.kernel.version>4.4.17</carbon.kernel.version>
<carbon.kernel.version.range>[4.4.0, 4.5.0)</carbon.kernel.version.range>
<carbon.ui.menu.stratos.version>2.2.0</carbon.ui.menu.stratos.version>
@ -1517,14 +1517,14 @@
<carbon.governance.version>4.7.8</carbon.governance.version>
<!-- Carbon Device Management -->
<carbon.device.mgt.version>3.0.112</carbon.device.mgt.version>
<carbon.device.mgt.version>3.0.135</carbon.device.mgt.version>
<carbon.device.mgt.version.range>[3.0.0, 4.0.0)</carbon.device.mgt.version.range>
<!-- IOT Device Management -->
<product.iot.version>${project.version}</product.iot.version>
<!-- Carbon Device Management Plugins-->
<carbon.device.mgt.plugin.version>4.0.82</carbon.device.mgt.plugin.version>
<carbon.device.mgt.plugin.version>4.0.87</carbon.device.mgt.plugin.version>
<!-- API Management -->
<carbon.api.mgt.version>6.1.109</carbon.api.mgt.version>
@ -1760,6 +1760,11 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>

@ -0,0 +1,52 @@
## Purpose
> Describe the problems, issues, or needs driving this feature/fix and include links to related issues in the following format: Resolves issue1, issue2, etc.
## Goals
> Describe the solutions that this feature/fix will introduce to resolve the problems described above
## Approach
> Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.
## User stories
> Summary of user stories addressed by this change>
## Release note
> Brief description of the new feature or bug fix as it will appear in the release notes
## Documentation
> Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter “N/A” plus brief explanation of why theres no doc impact
## Training
> Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable
## Certification
> Type “Sent” when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type “N/A” and explain why.
## Marketing
> Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable
## Automation tests
- Unit tests
> Code coverage information
- Integration tests
> Details about the test cases and coverage
## Security checks
- Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes/no
- Ran FindSecurityBugs plugin and verified report? yes/no
- Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes/no
## Samples
> Provide high-level details about the samples related to this feature
## Related PRs
> List any other related PRs
## Migrations (if applicable)
> Describe migration steps and platforms on which migration has been tested
## Test environment
> List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested
## Learning
> Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.
Loading…
Cancel
Save