From e355239e87d9ad37e87e2782dc76a9142db09fce Mon Sep 17 00:00:00 2001 From: ayeshLK Date: Wed, 7 Aug 2024 09:54:03 +0530 Subject: [PATCH] Restructure content-verification tests --- ballerina/tests/content_verification_test.bal | 4 ++-- ballerina/tests/test_ports.bal | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ballerina/tests/content_verification_test.bal b/ballerina/tests/content_verification_test.bal index 3c5788da..a4664b1b 100644 --- a/ballerina/tests/content_verification_test.bal +++ b/ballerina/tests/content_verification_test.bal @@ -65,7 +65,7 @@ isolated function isUrlEncodedContentVerified() returns boolean { secret: hashKey, unsubscribeOnShutdown: false } -service /subscriber on new Listener(9098) { +service /subscriber on new Listener(CONTENT_VERIFY_SUB_PORT) { remote function onEventNotification(ContentDistributionMessage event) returns Acknowledgement|SubscriptionDeletedError? { log:printInfo("[VERIFICATION] onEventNotification invoked ", contentDistributionMessage = event); @@ -86,7 +86,7 @@ service /subscriber on new Listener(9098) { } } -final http:Client contentVerificationClient = check new("http://localhost:9098/subscriber"); +final http:Client contentVerificationClient = check new(string `http://localhost:${CONTENT_VERIFY_SUB_PORT}/subscriber`); @test:Config { groups: ["contentVerification"] diff --git a/ballerina/tests/test_ports.bal b/ballerina/tests/test_ports.bal index f673c4f8..d4f27418 100644 --- a/ballerina/tests/test_ports.bal +++ b/ballerina/tests/test_ports.bal @@ -24,3 +24,4 @@ const int SUB_WITH_OPT_TARGET_PORT = BASE_PORT + 4; const int SSL_ENABLED_SUB_PORT = BASE_PORT + 5; const int MULTIPLE_SUB_ATTACH_PORT = BASE_PORT + 6; const int MANUAL_SUB_ATTACH_PORT = BASE_PORT + 7; +const int CONTENT_VERIFY_SUB_PORT = BASE_PORT + 8;