From 82774bb65eb53d4b2126b08ff343d8410226038e Mon Sep 17 00:00:00 2001 From: david-leifker <114954101+david-leifker@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:48:46 -0600 Subject: [PATCH] test(urn-validation): additional test case (#12001) --- .../entity/validation/ValidationApiUtilsTest.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/metadata-io/metadata-io-api/src/test/java/com/linkedin/metadata/entity/validation/ValidationApiUtilsTest.java b/metadata-io/metadata-io-api/src/test/java/com/linkedin/metadata/entity/validation/ValidationApiUtilsTest.java index a2c9a15d92f90..2ab6a50945ba3 100644 --- a/metadata-io/metadata-io-api/src/test/java/com/linkedin/metadata/entity/validation/ValidationApiUtilsTest.java +++ b/metadata-io/metadata-io-api/src/test/java/com/linkedin/metadata/entity/validation/ValidationApiUtilsTest.java @@ -79,11 +79,19 @@ public void testUrnWithIllegalDelimiter() { } @Test(expectedExceptions = IllegalArgumentException.class) - public void testComplexUrnWithParens() { + public void testComplexUrnWithParens1() { Urn invalidUrn = UrnUtils.getUrn("urn:li:dataset:(urn:li:dataPlatform:hdfs,(illegal),PROD)"); ValidationApiUtils.validateUrn(entityRegistry, invalidUrn, true); } + @Test(expectedExceptions = IllegalArgumentException.class) + public void testComplexUrnWithParens2() { + Urn invalidUrn = + UrnUtils.getUrn( + "urn:li:dataJob:(urn:li:dataFlow:(mssql,1/2/3/4.c_n on %28LOCAL%29,PROD),1/2/3/4.c_n on (LOCAL))"); + ValidationApiUtils.validateUrn(entityRegistry, invalidUrn, true); + } + @Test(expectedExceptions = IllegalArgumentException.class) public void testSimpleUrnWithParens() { Urn invalidUrn = UrnUtils.getUrn("urn:li:corpuser:(foo)123");