You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by sa...@apache.org on 2019/03/20 21:17:08 UTC
[atlas] branch master updated: ATLAS-3067: fix for IT failure in
EntityJerseyResourceIT.testCompleteUpdate()
This is an automated email from the ASF dual-hosted git repository.
sarath pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 2c0a8bc ATLAS-3067: fix for IT failure in EntityJerseyResourceIT.testCompleteUpdate()
2c0a8bc is described below
commit 2c0a8bcc1afe1588a1ffc3ea175bb29055c55894
Author: Sarath Subramanian <ss...@hortonworks.com>
AuthorDate: Wed Mar 20 14:16:04 2019 -0700
ATLAS-3067: fix for IT failure in EntityJerseyResourceIT.testCompleteUpdate()
---
.../web/integration/EntityJerseyResourceIT.java | 25 +++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java
index 15a06e3..edb4568 100755
--- a/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/integration/EntityJerseyResourceIT.java
@@ -35,6 +35,7 @@ import org.apache.atlas.type.AtlasType;
import org.apache.atlas.v1.typesystem.types.utils.TypesUtil;
import org.apache.atlas.utils.AuthenticationUtil;
import org.apache.commons.lang.RandomStringUtils;
+import org.apache.commons.lang.StringUtils;
import org.joda.time.DateTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -998,8 +999,11 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
List<Referenceable> refs = (List<Referenceable>) hiveTableInstance.get("columns");
Assert.assertEquals(refs.size(), 2);
- Assert.assertEquals(refs.get(0).getValuesMap(), values1);
- Assert.assertEquals(refs.get(1).getValuesMap(), values2);
+ Referenceable col3 = getReferenceable(refs, "col3");
+ Referenceable col4 = getReferenceable(refs, "col4");
+
+ Assert.assertEquals(col3.getValuesMap(), values1);
+ Assert.assertEquals(col4.getValuesMap(), values2);
}
@Test
@@ -1117,4 +1121,19 @@ public class EntityJerseyResourceIT extends BaseResourceIT {
}
}
-}
+ private Referenceable getReferenceable(List<Referenceable> refs, String name) {
+ Referenceable ret = null;
+
+ for (Referenceable ref : refs) {
+ Map<String, Object> values = ref.getValuesMap();
+ String entityName = (String) values.get("name");
+
+ if (StringUtils.equalsIgnoreCase(name, entityName)) {
+ ret = ref;
+ break;
+ }
+ }
+
+ return ret;
+ }
+}
\ No newline at end of file