fix(TUP-36626):tAmazonMysqlInput gets only tAmazonMysqlConnection and (#8018) (#8059)

remove the version compatible tMysqlConnection from valid list.
This commit is contained in:
zyuan-talend
2022-09-30 14:08:20 +08:00
committed by GitHub
parent 0d5a3d0515
commit 37f859093b
2 changed files with 5 additions and 6 deletions

View File

@@ -3899,9 +3899,6 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
} else if ((node.getComponent().getName() != null)) {
if (node.getComponent().getName().compareTo(componentName) == 0) {
addNodeIfNotInTheList(matchingNodes, node);
} else if (isCompatibleMatching(componentName, node)) {
//TUP-32758:Show the drag&drop such as mysql + Amazonmysql if property type + db version are compatible)
addNodeIfNotInTheList(matchingNodes, node);
} else if (node.getComponent() instanceof EmfComponent) {
EmfComponent component = (EmfComponent) node.getComponent();
String eqCompName = component.getEquivalent();
@@ -5056,6 +5053,8 @@ public class Process extends Element implements IProcess2, IGEFProcess, ILastVer
StringUtils.equals(filterFamilyNames[filterFamilyNames.length-1], familyNames[familyNames.length-1])) {
if (filterComponent instanceof EmfComponent) {
EmfComponent emfFilterComponent = (EmfComponent) filterComponent;
//Need to check if the component has been loaded or not
emfFilterComponent.getShortName();
COMPONENTType compType = emfFilterComponent.getEmfComponentType();
if (compType != null && compType.getPARAMETERS() != null && compType.getPARAMETERS().getPARAMETER() != null) {
EList parametersList = compType.getPARAMETERS().getPARAMETER();

View File

@@ -165,14 +165,14 @@ public class ProcessTest {
oracle12ConnNode.getElementParameter("DB_VERSION").setValue("ORACLE_12");
List<INode> s = process.getNodesOfType("tMysqlConnection");
assertEquals(s.size(),2); //all
assertEquals(s.size(),1);
s = process.getNodesOfType("tAmazonMysqlConnection");
assertEquals(s.size(),1); //amazon one
s = process.getNodesOfType("tOracleConnection");
assertEquals(s.size(),4); //all(18,9,12,11)
assertEquals(s.size(),3);
s = process.getNodesOfType("tAmazonOracleConnection");
assertEquals(s.size(),3); //oracle18, 12 plus amazon one
assertEquals(s.size(),1); //amazon one
}