From e77b0bae086cc9c1665598f9634549ea900b44f8 Mon Sep 17 00:00:00 2001 From: chathurangaj Date: Mon, 16 Dec 2024 15:33:58 +0530 Subject: [PATCH] update endpoint identifier constant use for http connection representation --- .../org/apache/synapse/SynapseConstants.java | 2 +- .../HTTPConnectionRepresentationTest.java | 32 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java b/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java index b627b4a239..3b68e2af03 100644 --- a/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java +++ b/modules/core/src/main/java/org/apache/synapse/SynapseConstants.java @@ -627,7 +627,7 @@ public enum ENDPOINT_TIMEOUT_TYPE { ENDPOINT_TIMEOUT, GLOBAL_TIMEOUT, HTTP_CONNE public static final String ANALYTICS_METADATA = "ANALYTICS_METADATA"; // Constants for the HTTP Connection - public static final String ENDPOINT_IDENTIFIER = "INTERNAL_ENDPOINT_REFERENCE"; + public static final String ENDPOINT_IDENTIFIER = "_INTERNAL_ENDPOINT_REFERENCE"; public static final String BASIC_AUTH = "Basic Auth"; public static final String OAUTH = "OAuth"; public static final String OAUTH_GRANT_TYPE_AUTHORIZATION_CODE = "Authorization Code"; diff --git a/modules/core/src/test/java/org/apache/synapse/deployers/HTTPConnectionRepresentationTest.java b/modules/core/src/test/java/org/apache/synapse/deployers/HTTPConnectionRepresentationTest.java index f8be2798b3..2c67991005 100644 --- a/modules/core/src/test/java/org/apache/synapse/deployers/HTTPConnectionRepresentationTest.java +++ b/modules/core/src/test/java/org/apache/synapse/deployers/HTTPConnectionRepresentationTest.java @@ -62,7 +62,7 @@ public void testEndpointOMElementGeneration() throws XMLStreamException { " Discard\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "Discard" + @@ -102,7 +102,7 @@ public void testEndpointOMElementGenerationWithoutErrorHandling() throws XMLStre " http://jsonplaceholder.typicode.com/posts\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + ""; InputStream inputStream = new ByteArrayInputStream(omElementString.getBytes(StandardCharsets.UTF_8)); @@ -130,7 +130,7 @@ public void testEndpointOMElementGenerationWithTrace() throws XMLStreamException " enable\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + ""; InputStream inputStream = new ByteArrayInputStream(omElementString.getBytes(StandardCharsets.UTF_8)); @@ -158,7 +158,7 @@ public void testEndpointOMElementGenerationWithStatistics() throws XMLStreamExce " enable\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + ""; InputStream inputStream = new ByteArrayInputStream(omElementString.getBytes(StandardCharsets.UTF_8)); @@ -187,7 +187,7 @@ public void testEndpointOMElementGenerationWithMiscellaneousDescription() throws " hello world\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "hello world" + ""; @@ -218,7 +218,7 @@ public void testEndpointOMElementGenerationWithMiscellaneousProperties() throws " name1:scope1:value1,name2:scope2:value2,\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "" + @@ -253,7 +253,7 @@ public void testEndpointOMElementGenerationWithQualityOfServiceAddressing() thro " enable\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "" + @@ -289,7 +289,7 @@ public void testEndpointOMElementGenerationWithQualityOfServiceSecurityPolicy() " samplePolicy\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "" + @@ -328,7 +328,7 @@ public void testEndpointOMElementGenerationWithQualityOfServiceSecurityInboundOu " sampleOutboundPolicy\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "" + @@ -368,7 +368,7 @@ public void testEndpointOMElementGenerationWithTimeoutActionNever() throws XMLSt " Never\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "" + @@ -417,7 +417,7 @@ public void testEndpointOMElementGenerationWithBasicAuth() throws XMLStreamExcep " admin\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "Discard" + @@ -478,7 +478,7 @@ public void testEndpointOMElementGenerationWithOAuthAuthorizationCode() throws X " admin\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "Discard" + @@ -546,7 +546,7 @@ public void testEndpointOMElementGenerationWithOAuthAuthorizationCodeAdditionalP " name1:value1, name2:value2\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "Discard" + @@ -618,7 +618,7 @@ public void testEndpointOMElementGenerationWithOAuthAuthorizationCodeAndExpressi " {$ctx:admin}\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "Discard" + @@ -684,7 +684,7 @@ public void testEndpointOMElementGenerationWithOAuthClientCredentials() throws X " admin\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "Discard" + @@ -751,7 +751,7 @@ public void testEndpointOMElementGenerationWithOAuthPassword() throws XMLStreamE " admin\n" + ""; String expectedEndpointOMElementString = - "" + + "" + "" + "" + "Discard" +