You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ma...@apache.org on 2017/01/14 01:25:45 UTC

incubator-atlas git commit: ATLAS-1434: fixed unit test so that type name conforms to new validation; updated error message per review comments

Repository: incubator-atlas
Updated Branches:
  refs/heads/master b725caaa8 -> 53f88222a


ATLAS-1434: fixed unit test so that type name conforms to new validation; updated error message per review comments

Signed-off-by: Madhan Neethiraj <ma...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/53f88222
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/53f88222
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/53f88222

Branch: refs/heads/master
Commit: 53f88222a70c9afbb367758d810b5590d9b72bf7
Parents: b725caa
Author: ashutoshm <am...@hortonworks.com>
Authored: Fri Jan 13 09:06:30 2017 -0800
Committer: Madhan Neethiraj <ma...@apache.org>
Committed: Fri Jan 13 17:25:35 2017 -0800

----------------------------------------------------------------------
 intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java      | 4 ++--
 release-log.txt                                                  | 1 +
 .../org/apache/atlas/web/resources/EntityV2JerseyResourceIT.java | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/53f88222/intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java
----------------------------------------------------------------------
diff --git a/intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java b/intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java
index 9f3b90e..c79a55d 100644
--- a/intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java
+++ b/intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java
@@ -61,8 +61,8 @@ public class AtlasTypeUtil {
     private static final Pattern NAME_PATTERN = Pattern.compile(NAME_REGEX);
     private static final Pattern TRAIT_NAME_PATTERN = Pattern.compile(TRAIT_NAME_REGEX);
 
-    private static final String InvalidTypeNameErrorMessage = "Only characters, numbers and '_' are allowed in names.";
-    private static final String InvalidTraitTypeNameErrorMessage = "Only characters, numbers, '.' and '_' are allowed in names.";
+    private static final String InvalidTypeNameErrorMessage = "Only alphanumeric characters, numbers and '_' are allowed in names.";
+    private static final String InvalidTraitTypeNameErrorMessage = "Only alphanumeric characters, numbers, '.' and '_' are allowed in names.";
 
     static {
         Collections.addAll(ATLAS_BUILTIN_TYPENAMES, AtlasBaseTypeDef.ATLAS_BUILTIN_TYPES);

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/53f88222/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 497ad9a..2a52fcc 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1434 fixed unit test to use correct type names; updated error message per review comments (ashutoshm via mneethiraj)
 ATLAS-1391 Add exclusion mechanism for Atlas audit mechanism (guptaneeru via svimal2106)
 ATLAS-1280 Atlas changes to support Hive hook for Hive2 (mneethiraj via svimal2106)
 ATLAS-1432 Responsive loader and css changes (kevalbhatt via mneethiraj)

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/53f88222/webapp/src/test/java/org/apache/atlas/web/resources/EntityV2JerseyResourceIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/atlas/web/resources/EntityV2JerseyResourceIT.java b/webapp/src/test/java/org/apache/atlas/web/resources/EntityV2JerseyResourceIT.java
index 8b4bd96..d7702e2 100755
--- a/webapp/src/test/java/org/apache/atlas/web/resources/EntityV2JerseyResourceIT.java
+++ b/webapp/src/test/java/org/apache/atlas/web/resources/EntityV2JerseyResourceIT.java
@@ -536,7 +536,7 @@ public class EntityV2JerseyResourceIT extends BaseResourceIT {
 
     @Test
     public void testUTF8() throws Exception {
-        String classType = random();
+        String classType = randomString();
         String attrName = random();
         String attrValue = random();