Skip to content

Commit

Permalink
defect #1446091: use common XML mapper output factory that will be co…
Browse files Browse the repository at this point in the history
…mmon for all Team city CI version, upgrade to latest SDK version
  • Loading branch information
nissimshitrit committed Dec 9, 2021
1 parent 4491af9 commit d9bef97
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>teamcity-ci-plugin-suite</artifactId>
<groupId>com.hpe.adm.octane.ciplugins</groupId>
<version>1.4.0-SNAPSHOT</version>
<version>1.4.1-SNAPSHOT</version>
</parent>

<artifactId>teamcity-ci-plugin-build</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<artifactId>teamcity-ci-plugin-suite</artifactId>
<groupId>com.hpe.adm.octane.ciplugins</groupId>
<version>1.4.0-SNAPSHOT</version>
<version>1.4.1-SNAPSHOT</version>
</parent>

<properties>
Expand Down Expand Up @@ -89,7 +89,7 @@
<dependency>
<artifactId>integrations-sdk</artifactId>
<groupId>com.hpe.adm.octane.ciplugins</groupId>
<version>2.6.9.13</version>
<version>2.7.1.33</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
* Created by lazara on 23/12/2015.
*/

import com.ctc.wstx.stax.WstxInputFactory;
import com.ctc.wstx.stax.WstxOutputFactory;
import com.hp.octane.integrations.OctaneConfiguration;
import com.hp.octane.integrations.OctaneSDK;
import com.hp.octane.integrations.dto.DTOFactory;
Expand Down Expand Up @@ -75,8 +77,8 @@ private void initPlugin() throws Exception {
buildServer.registerExtension(ServerExtension.class, PLUGIN_NAME, this);
SDKBasedLoggerProvider.configure(TeamCityPluginServicesImpl.getAllowedOctaneStorage(buildServerEx));

//remove prefix zdef from attribures , for example zdef-322307361:started="1618753398313"
DTOFactory.getInstance().getXMLMapper().getFactory().getXMLOutputFactory().setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, false);
//Common Xml mapper factory that used on recent Team city versions
DTOFactory.getInstance().initXmlMapper(new WstxInputFactory(),new WstxOutputFactory());

logger.info("");
logger.info("**********************************************************************");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private InputStream tryHandleExternalTestResults(SBuildType buildType, SBuild bu

}

GherkinUtils.aggregateGherkinFilesToMqmResultFile(files, mqmFilePath, jobId, buildId);
GherkinUtils.aggregateGherkinFilesToMqmResultFile(files, mqmFilePath, jobId, buildId, DTOFactory.getInstance());
final InputStream targetStream = new DataInputStream(new FileInputStream(mqmFilePath));
return targetStream;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import com.hp.octane.integrations.executor.TestsToRunConvertersFactory;
import com.hp.octane.integrations.executor.TestsToRunFramework;

import java.util.HashMap;

public class TeamCityTestsToRunConverterBuilder {
public final static String TESTS_TO_RUN_PARAMETER = "testsToRun";
public final static String TESTING_FRAMEWORK_PARAMETER = "Testing_framework";
Expand All @@ -18,6 +20,6 @@ public TeamCityTestsToRunConverterBuilder(){
}

public TestsToRunConverterResult convert(String rawTests, String executingDirectory){
return TestsToRunConvertersFactory.createConverter(testsToRunFramework).convert(rawTests, executingDirectory);
return TestsToRunConvertersFactory.createConverter(testsToRunFramework).convert(rawTests, executingDirectory,new HashMap<>());
}
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.hpe.adm.octane.ciplugins</groupId>
<artifactId>teamcity-ci-plugin-suite</artifactId>
<version>1.4.0-SNAPSHOT</version>
<version>1.4.1-SNAPSHOT</version>
<packaging>pom</packaging>

<name>ALM Octane teamcity plugin suite</name>
Expand Down

0 comments on commit d9bef97

Please sign in to comment.