Skip to content

Commit

Permalink
Fixing maven integraion test issues
Browse files Browse the repository at this point in the history
- When MT configuraton for English is not available, returns empty target language set, instead of null
- download-basic test to specify target languages explicitly instead of default MT languages that can be changed depending on GP deployments.
  • Loading branch information
yoshito-umaoka authored and yumaoka committed Aug 26, 2019
1 parent e8118b2 commit 0aa5ce0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gp-maven-plugin/src/it/download-basic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@
</includes>
</sourceFiles>
<type>JSON</type>
<sourceLanguage>en</sourceLanguage>
<targetLanguages>
<param>de</param>
<param>fr</param>
</targetLanguages>
</bundleSet>
</bundleSets>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion gp-maven-plugin/src/it/download-basic/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ try {
}
}
}
assert filecount == 20
assert filecount == 6

def dir2 = new File(targetLocation2)
dir2.traverse { file ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,13 @@ protected Set<String> resolveTargetLanguages(BundleSet bundleSet) throws MojoFai
Map<String, Set<String>> activeMTLangs = client.getConfiguredMTLanguages();
targetLanguages = activeMTLangs.get(srcLang);
} catch (ServiceException e) {
targetLanguages = Collections.emptySet();
throw new MojoFailureException("Globalization Pipeline service error", e);
}

if (targetLanguages == null) {
targetLanguages = Collections.emptySet();
}

getLog().info("The configuration parameter 'targetLanguages' is not specified."
+ " Using currently active target languages: " + targetLanguages);
}
Expand Down

0 comments on commit 0aa5ce0

Please sign in to comment.