Commit bb189766 by Sarath Subramanian

ATLAS-2079: Fix coverity scan issue and IT failures introduced by ATLAS-2062 - missing changes

parent 97ae3a3c
...@@ -304,7 +304,7 @@ public class FalconHookIT { ...@@ -304,7 +304,7 @@ public class FalconHookIT {
} }
private String assertEntityIsRegistered(final String typeName, final String property, final String value) throws Exception { private String assertEntityIsRegistered(final String typeName, final String property, final String value) throws Exception {
waitFor(80000, new Predicate() { waitFor(1000, new Predicate() {
@Override @Override
public void evaluate() throws Exception { public void evaluate() throws Exception {
Referenceable entity = atlasClient.getEntity(typeName, property, value); Referenceable entity = atlasClient.getEntity(typeName, property, value);
......
...@@ -155,7 +155,7 @@ public class HiveITBase { ...@@ -155,7 +155,7 @@ public class HiveITBase {
protected String assertEntityIsRegistered(final String typeName, final String property, final String value, protected String assertEntityIsRegistered(final String typeName, final String property, final String value,
final HiveHookIT.AssertPredicate assertPredicate) throws Exception { final HiveHookIT.AssertPredicate assertPredicate) throws Exception {
waitFor(80000, new HiveHookIT.Predicate() { waitFor(1000, new HiveHookIT.Predicate() {
@Override @Override
public void evaluate() throws Exception { public void evaluate() throws Exception {
Referenceable entity = atlasClient.getEntity(typeName, property, value); Referenceable entity = atlasClient.getEntity(typeName, property, value);
......
...@@ -1803,7 +1803,7 @@ public class HiveHookIT extends HiveITBase { ...@@ -1803,7 +1803,7 @@ public class HiveHookIT extends HiveITBase {
} }
private void assertEntityIsNotRegistered(final String typeName, final String property, final String value) throws Exception { private void assertEntityIsNotRegistered(final String typeName, final String property, final String value) throws Exception {
waitFor(80000, new Predicate() { waitFor(1000, new Predicate() {
@Override @Override
public void evaluate() throws Exception { public void evaluate() throws Exception {
try { try {
......
...@@ -1922,7 +1922,7 @@ ...@@ -1922,7 +1922,7 @@
<log4j.configuration>atlas-log4j.xml</log4j.configuration> <log4j.configuration>atlas-log4j.xml</log4j.configuration>
</systemProperties> </systemProperties>
<skipTests>${skipTests}</skipTests> <skipTests>${skipTests}</skipTests>
<forkCount>1C</forkCount> <forkCount>2C</forkCount>
<reuseForks>false</reuseForks> <reuseForks>false</reuseForks>
<redirectTestOutputToFile>true</redirectTestOutputToFile> <redirectTestOutputToFile>true</redirectTestOutputToFile>
<argLine>-Djava.awt.headless=true -Dproject.version=${project.version} <argLine>-Djava.awt.headless=true -Dproject.version=${project.version}
......
...@@ -112,7 +112,7 @@ public class TypesUtil { ...@@ -112,7 +112,7 @@ public class TypesUtil {
public static HierarchicalTypeDefinition<ClassType> createClassTypeDef(String name, String description, String version, public static HierarchicalTypeDefinition<ClassType> createClassTypeDef(String name, String description, String version,
ImmutableSet<String> superTypes, AttributeDefinition... attrDefs) { ImmutableSet<String> superTypes, AttributeDefinition... attrDefs) {
return new HierarchicalTypeDefinition<>(ClassType.class, name, description, superTypes, attrDefs); return new HierarchicalTypeDefinition<>(ClassType.class, name, description, version, superTypes, attrDefs);
} }
public static TypesDef getTypesDef(ImmutableList<EnumTypeDefinition> enums, public static TypesDef getTypesDef(ImmutableList<EnumTypeDefinition> enums,
......
...@@ -112,14 +112,14 @@ public class TypesJerseyResourceIT extends BaseResourceIT { ...@@ -112,14 +112,14 @@ public class TypesJerseyResourceIT extends BaseResourceIT {
@Test @Test
public void testUpdate() throws Exception { public void testUpdate() throws Exception {
HierarchicalTypeDefinition<ClassType> typeDefinition = TypesUtil HierarchicalTypeDefinition<ClassType> typeDefinition = TypesUtil
.createClassTypeDef(randomString(), ImmutableSet.<String>of(), .createClassTypeDef(randomString(), null, "1.0", ImmutableSet.<String>of(),
TypesUtil.createUniqueRequiredAttrDef(NAME, DataTypes.STRING_TYPE)); TypesUtil.createUniqueRequiredAttrDef(NAME, DataTypes.STRING_TYPE));
List<String> typesCreated = atlasClientV1.createType(TypesSerialization.toJson(typeDefinition, false)); List<String> typesCreated = atlasClientV1.createType(TypesSerialization.toJson(typeDefinition, false));
assertEquals(typesCreated.size(), 1); assertEquals(typesCreated.size(), 1);
assertEquals(typesCreated.get(0), typeDefinition.typeName); assertEquals(typesCreated.get(0), typeDefinition.typeName);
//Add attribute description //Add attribute description
typeDefinition = TypesUtil.createClassTypeDef(typeDefinition.typeName, typeDefinition = TypesUtil.createClassTypeDef(typeDefinition.typeName, null, "2.0",
ImmutableSet.<String>of(), ImmutableSet.<String>of(),
TypesUtil.createUniqueRequiredAttrDef(NAME, DataTypes.STRING_TYPE), TypesUtil.createUniqueRequiredAttrDef(NAME, DataTypes.STRING_TYPE),
createOptionalAttrDef(DESCRIPTION, DataTypes.STRING_TYPE)); createOptionalAttrDef(DESCRIPTION, DataTypes.STRING_TYPE));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment