Skip to content

Commit

Permalink
Restructure manual-attach tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ayeshLK committed Aug 7, 2024
1 parent 905de47 commit 209867f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ballerina/tests/multi_service_listener_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import ballerina/test;
import ballerina/http;
import ballerina/mime;

listener Listener multiServiceListener = new(MULTIPLE_SUB_ATTACHED_PORT);
listener Listener multiServiceListener = new(MULTIPLE_SUB_ATTACH_PORT);

@SubscriberServiceConfig {
unsubscribeOnShutdown: false
Expand Down Expand Up @@ -73,8 +73,8 @@ service /subscriberTwo on multiServiceListener {
}
}

http:Client clientForServiceOne = check new (string `http://localhost:${MULTIPLE_SUB_ATTACHED_PORT}/subscriberOne`);
http:Client clientForServiceTwo = check new (string `http://localhost:${MULTIPLE_SUB_ATTACHED_PORT}/subscriberTwo`);
http:Client clientForServiceOne = check new (string `http://localhost:${MULTIPLE_SUB_ATTACH_PORT}/subscriberOne`);
http:Client clientForServiceTwo = check new (string `http://localhost:${MULTIPLE_SUB_ATTACH_PORT}/subscriberTwo`);

@test:Config {
groups: ["multiServiceListener"]
Expand Down
3 changes: 2 additions & 1 deletion ballerina/tests/test_ports.bal
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ const int SUB_WITH_DFLT_METHODS_PORT = BASE_PORT + 2;
const int SUB_WITH_ADDITIONAL_ERRDETAILS_PORT = BASE_PORT + 3;
const int SUB_WITH_OPT_TARGET_PORT = BASE_PORT + 4;
const int SSL_ENABLED_SUB_PORT = BASE_PORT + 5;
const int MULTIPLE_SUB_ATTACHED_PORT = BASE_PORT + 6;
const int MULTIPLE_SUB_ATTACH_PORT = BASE_PORT + 6;
const int MANUAL_SUB_ATTACH_PORT = BASE_PORT + 7;
4 changes: 2 additions & 2 deletions ballerina/tests/websub_config_manual_attach_test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ isolated service class SimpleWebsubService {
}
}

listener Listener manualConfigAttachListener = new (9097);
listener Listener manualConfigAttachListener = new (MANUAL_SUB_ATTACH_PORT);
SimpleWebsubService simpleSubscriberServiceInstace = new;

@test:BeforeGroups { value:["manualConfigAttach"] }
Expand All @@ -61,7 +61,7 @@ function afterManualConfigAttachTest() returns error? {
check manualConfigAttachListener.gracefulStop();
}

http:Client manualConfigAttachClientEp = check new("http://localhost:9097/subscriber");
http:Client manualConfigAttachClientEp = check new(string `http://localhost:${MANUAL_SUB_ATTACH_PORT}/subscriber`);

@test:Config {
groups: ["manualConfigAttach"]
Expand Down

0 comments on commit 209867f

Please sign in to comment.