From 536127cf6e9ad182d66cb1cc51c9c248b00a2177 Mon Sep 17 00:00:00 2001 From: ballerina-bot Date: Mon, 27 Jan 2025 20:21:26 +0530 Subject: [PATCH 1/5] [Automated] Update dependencies --- gradle.properties | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/gradle.properties b/gradle.properties index f28519099..bcf487795 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.caching=true group=io.ballerina.stdlib version=1.15.0-SNAPSHOT -ballerinaLangVersion=2201.11.0-20250121-140200-15de3b28 +ballerinaLangVersion=2201.11.0-20250127-101700-a4b67fe5 checkstylePluginVersion=10.12.0 spotbugsPluginVersion=6.0.18 @@ -15,35 +15,35 @@ jacocoVersion=0.8.10 # Ballerina Library Dependencies # Level 01 -stdlibIoVersion=1.7.0-20250121-143700-fac534d -stdlibTimeVersion=2.6.0-20250121-143700-96fbd6a -stdlibUrlVersion=2.5.0-20250121-143700-9db47c2 +stdlibIoVersion=1.7.0-20250127-170200-0d36f73 +stdlibTimeVersion=2.6.0-20250127-170200-86bdc5a +stdlibUrlVersion=2.5.0-20250127-170200-e4cac31 # Level 02 -stdlibConstraintVersion=1.6.0-20250121-144400-48092bd -stdlibCryptoVersion=2.8.0-20250121-144400-cf0d2db -stdlibLogVersion=2.11.0-20250121-151200-196ede7 -stdlibOsVersion=1.9.0-20250121-144400-3c22e13 -stdlibTaskVersion=2.6.0-20250121-144900-6de8c93 +stdlibConstraintVersion=1.6.0-20250127-170900-48ad9ae +stdlibCryptoVersion=2.8.0-20250127-170800-6c52ac3 +stdlibLogVersion=2.11.0-20250127-173700-45079a8 +stdlibOsVersion=1.9.0-20250127-170900-54f2a57 +stdlibTaskVersion=2.6.0-20250127-171400-af6480d # Level 03 -stdlibCacheVersion=3.9.0-20250121-150600-d24d690 -stdlibFileVersion=1.11.0-20250122-120300-6dd5c6c -stdlibMimeVersion=2.11.0-20250122-120300-9005c8c -stdlibUuidVersion=1.9.0-20250121-171900-df5e661 +stdlibCacheVersion=3.9.0-20250127-173100-ebe1e73 +stdlibFileVersion=1.11.0-20250127-182400-816587e +stdlibMimeVersion=2.11.0-20250127-182500-46c9896 +stdlibUuidVersion=1.9.0-20250127-181300-0f9a3f6 # Level 04 -stdlibAuthVersion=2.13.0-20250122-120100-293d482 +stdlibAuthVersion=2.13.0-20250127-182300-e14b66f stdlibDataJsonDataVersion=1.0.0-20241125-114000-0c2f457 -stdlibJwtVersion=2.14.0-20250122-120200-9a7dd9b -stdlibOAuth2Version=2.13.0-20250122-120600-a9c21e1 +stdlibJwtVersion=2.14.0-20250127-182500-ce5b71c +stdlibOAuth2Version=2.13.0-20250127-182700-5ce88a0 # Level 05 -stdlibHttpVersion=2.13.0-20250122-144400-fb78cb1 +stdlibHttpVersion=2.13.0-20250127-191800-f0dc4e5 # Level 06 -stdlibWebsocketVersion=2.13.0-20250122-154200-e927fbf +stdlibWebsocketVersion=2.13.0-20250127-201400-24bf289 # Ballerinax Observer -observeVersion=1.4.0-20250121-143800-aa6fa02 -observeInternalVersion=1.4.0-20250121-144700-d59c066 +observeVersion=1.4.0-20250127-170200-f9c0dec +observeInternalVersion=1.4.0-20250127-171000-b05ff1d From a6c704b646f5042e1913654074a04eb2ae970461 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Mon, 27 Jan 2025 20:40:17 +0530 Subject: [PATCH 2/5] [Automated] Update the native jar versions --- ballerina-tests/graphql-advanced-test-suite/Dependencies.toml | 3 ++- ballerina-tests/graphql-client-test-suite/Dependencies.toml | 2 +- .../graphql-dataloader-test-suite/Dependencies.toml | 3 ++- .../graphql-interceptor-test-suite/Dependencies.toml | 3 ++- ballerina-tests/graphql-security-test-suite/Dependencies.toml | 3 ++- ballerina-tests/graphql-service-test-suite/Dependencies.toml | 3 ++- ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml | 2 +- .../graphql-subscription-test-suite/Dependencies.toml | 3 ++- ballerina-tests/graphql-test-common/Dependencies.toml | 3 ++- 9 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ballerina-tests/graphql-advanced-test-suite/Dependencies.toml b/ballerina-tests/graphql-advanced-test-suite/Dependencies.toml index 2ad667110..62020b4ae 100644 --- a/ballerina-tests/graphql-advanced-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-advanced-test-suite/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20250121-140200-15de3b28" +distribution-version = "2201.11.0-20250127-101700-a4b67fe5" [[package]] org = "ballerina" @@ -168,6 +168,7 @@ dependencies = [ ] modules = [ {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.default"}, {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} ] diff --git a/ballerina-tests/graphql-client-test-suite/Dependencies.toml b/ballerina-tests/graphql-client-test-suite/Dependencies.toml index c08de9c0b..416db882a 100644 --- a/ballerina-tests/graphql-client-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-client-test-suite/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20250121-140200-15de3b28" +distribution-version = "2201.11.0-20250127-101700-a4b67fe5" [[package]] org = "ballerina" diff --git a/ballerina-tests/graphql-dataloader-test-suite/Dependencies.toml b/ballerina-tests/graphql-dataloader-test-suite/Dependencies.toml index 7a1329b9e..b07ec77f5 100644 --- a/ballerina-tests/graphql-dataloader-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-dataloader-test-suite/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20250121-140200-15de3b28" +distribution-version = "2201.11.0-20250127-101700-a4b67fe5" [[package]] org = "ballerina" @@ -170,6 +170,7 @@ dependencies = [ ] modules = [ {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.default"}, {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} ] diff --git a/ballerina-tests/graphql-interceptor-test-suite/Dependencies.toml b/ballerina-tests/graphql-interceptor-test-suite/Dependencies.toml index 713be1af0..bf07f5ae1 100644 --- a/ballerina-tests/graphql-interceptor-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-interceptor-test-suite/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20250121-140200-15de3b28" +distribution-version = "2201.11.0-20250127-101700-a4b67fe5" [[package]] org = "ballerina" @@ -170,6 +170,7 @@ dependencies = [ ] modules = [ {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.default"}, {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} ] diff --git a/ballerina-tests/graphql-security-test-suite/Dependencies.toml b/ballerina-tests/graphql-security-test-suite/Dependencies.toml index 12e059057..7e5e42c1e 100644 --- a/ballerina-tests/graphql-security-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-security-test-suite/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20250121-140200-15de3b28" +distribution-version = "2201.11.0-20250127-101700-a4b67fe5" [[package]] org = "ballerina" @@ -169,6 +169,7 @@ dependencies = [ ] modules = [ {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.default"}, {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} ] diff --git a/ballerina-tests/graphql-service-test-suite/Dependencies.toml b/ballerina-tests/graphql-service-test-suite/Dependencies.toml index 03483c1b6..fff771ca0 100644 --- a/ballerina-tests/graphql-service-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-service-test-suite/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20250121-140200-15de3b28" +distribution-version = "2201.11.0-20250127-101700-a4b67fe5" [[package]] org = "ballerina" @@ -165,6 +165,7 @@ dependencies = [ ] modules = [ {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.default"}, {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} ] diff --git a/ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml b/ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml index 6ab3b738f..c45de599a 100644 --- a/ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20250121-140200-15de3b28" +distribution-version = "2201.11.0-20250127-101700-a4b67fe5" [[package]] org = "ballerina" diff --git a/ballerina-tests/graphql-subscription-test-suite/Dependencies.toml b/ballerina-tests/graphql-subscription-test-suite/Dependencies.toml index ab34e0b35..dce69479a 100644 --- a/ballerina-tests/graphql-subscription-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-subscription-test-suite/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20250121-140200-15de3b28" +distribution-version = "2201.11.0-20250127-101700-a4b67fe5" [[package]] org = "ballerina" @@ -181,6 +181,7 @@ dependencies = [ ] modules = [ {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.default"}, {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} ] diff --git a/ballerina-tests/graphql-test-common/Dependencies.toml b/ballerina-tests/graphql-test-common/Dependencies.toml index e33f0bc27..c8faee093 100644 --- a/ballerina-tests/graphql-test-common/Dependencies.toml +++ b/ballerina-tests/graphql-test-common/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20250121-140200-15de3b28" +distribution-version = "2201.11.0-20250127-101700-a4b67fe5" [[package]] org = "ballerina" @@ -149,6 +149,7 @@ dependencies = [ ] modules = [ {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.default"}, {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} ] From 4fa4609075962cc496abc26dac2765a982ba9ea0 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Mon, 27 Jan 2025 20:42:18 +0530 Subject: [PATCH 3/5] [Automated] Update the native jar versions --- ballerina/Dependencies.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 63527fb52..f2e563605 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,7 +5,7 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.11.0-20250121-140200-15de3b28" +distribution-version = "2201.11.0-20250127-101700-a4b67fe5" [[package]] org = "ballerina" @@ -142,6 +142,7 @@ dependencies = [ ] modules = [ {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.default"}, {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} ] From 1f497c2cdb133d87c90e2a5c9cdd927e60a1aa98 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Mon, 27 Jan 2025 20:45:41 +0530 Subject: [PATCH 4/5] [Automated] Update the native jar versions --- ballerina-tests/graphql-advanced-test-suite/Dependencies.toml | 1 - ballerina-tests/graphql-client-test-suite/Dependencies.toml | 1 - .../graphql-dataloader-test-suite/Dependencies.toml | 1 - .../graphql-interceptor-test-suite/Dependencies.toml | 1 - ballerina-tests/graphql-security-test-suite/Dependencies.toml | 1 - ballerina-tests/graphql-service-test-suite/Dependencies.toml | 1 - ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml | 1 - .../graphql-subscription-test-suite/Dependencies.toml | 1 - ballerina-tests/graphql-test-common/Dependencies.toml | 4 ---- 9 files changed, 12 deletions(-) diff --git a/ballerina-tests/graphql-advanced-test-suite/Dependencies.toml b/ballerina-tests/graphql-advanced-test-suite/Dependencies.toml index 62020b4ae..9b34c0db2 100644 --- a/ballerina-tests/graphql-advanced-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-advanced-test-suite/Dependencies.toml @@ -130,7 +130,6 @@ dependencies = [ {org = "ballerina", name = "graphql"}, {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, - {org = "ballerina", name = "log"}, {org = "ballerina", name = "test"}, {org = "ballerina", name = "websocket"} ] diff --git a/ballerina-tests/graphql-client-test-suite/Dependencies.toml b/ballerina-tests/graphql-client-test-suite/Dependencies.toml index 416db882a..0fc2727f7 100644 --- a/ballerina-tests/graphql-client-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-client-test-suite/Dependencies.toml @@ -129,7 +129,6 @@ dependencies = [ {org = "ballerina", name = "graphql"}, {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, - {org = "ballerina", name = "log"}, {org = "ballerina", name = "test"}, {org = "ballerina", name = "websocket"} ] diff --git a/ballerina-tests/graphql-dataloader-test-suite/Dependencies.toml b/ballerina-tests/graphql-dataloader-test-suite/Dependencies.toml index b07ec77f5..1382de65f 100644 --- a/ballerina-tests/graphql-dataloader-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-dataloader-test-suite/Dependencies.toml @@ -131,7 +131,6 @@ dependencies = [ {org = "ballerina", name = "graphql"}, {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, - {org = "ballerina", name = "log"}, {org = "ballerina", name = "test"}, {org = "ballerina", name = "websocket"} ] diff --git a/ballerina-tests/graphql-interceptor-test-suite/Dependencies.toml b/ballerina-tests/graphql-interceptor-test-suite/Dependencies.toml index bf07f5ae1..1401fce44 100644 --- a/ballerina-tests/graphql-interceptor-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-interceptor-test-suite/Dependencies.toml @@ -131,7 +131,6 @@ dependencies = [ {org = "ballerina", name = "graphql"}, {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, - {org = "ballerina", name = "log"}, {org = "ballerina", name = "test"}, {org = "ballerina", name = "websocket"} ] diff --git a/ballerina-tests/graphql-security-test-suite/Dependencies.toml b/ballerina-tests/graphql-security-test-suite/Dependencies.toml index 7e5e42c1e..ddf65d393 100644 --- a/ballerina-tests/graphql-security-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-security-test-suite/Dependencies.toml @@ -130,7 +130,6 @@ dependencies = [ {org = "ballerina", name = "graphql"}, {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, - {org = "ballerina", name = "log"}, {org = "ballerina", name = "test"}, {org = "ballerina", name = "websocket"} ] diff --git a/ballerina-tests/graphql-service-test-suite/Dependencies.toml b/ballerina-tests/graphql-service-test-suite/Dependencies.toml index fff771ca0..6c5ecce4b 100644 --- a/ballerina-tests/graphql-service-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-service-test-suite/Dependencies.toml @@ -127,7 +127,6 @@ dependencies = [ {org = "ballerina", name = "graphql"}, {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, - {org = "ballerina", name = "log"}, {org = "ballerina", name = "test"}, {org = "ballerina", name = "websocket"} ] diff --git a/ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml b/ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml index c45de599a..26ace65cc 100644 --- a/ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml @@ -122,7 +122,6 @@ dependencies = [ {org = "ballerina", name = "graphql"}, {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, - {org = "ballerina", name = "log"}, {org = "ballerina", name = "test"}, {org = "ballerina", name = "websocket"} ] diff --git a/ballerina-tests/graphql-subscription-test-suite/Dependencies.toml b/ballerina-tests/graphql-subscription-test-suite/Dependencies.toml index dce69479a..177645283 100644 --- a/ballerina-tests/graphql-subscription-test-suite/Dependencies.toml +++ b/ballerina-tests/graphql-subscription-test-suite/Dependencies.toml @@ -142,7 +142,6 @@ dependencies = [ {org = "ballerina", name = "graphql"}, {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, - {org = "ballerina", name = "log"}, {org = "ballerina", name = "test"}, {org = "ballerina", name = "websocket"} ] diff --git a/ballerina-tests/graphql-test-common/Dependencies.toml b/ballerina-tests/graphql-test-common/Dependencies.toml index c8faee093..612ebd9f6 100644 --- a/ballerina-tests/graphql-test-common/Dependencies.toml +++ b/ballerina-tests/graphql-test-common/Dependencies.toml @@ -111,7 +111,6 @@ dependencies = [ {org = "ballerina", name = "graphql"}, {org = "ballerina", name = "http"}, {org = "ballerina", name = "io"}, - {org = "ballerina", name = "log"}, {org = "ballerina", name = "test"}, {org = "ballerina", name = "websocket"} ] @@ -277,9 +276,6 @@ dependencies = [ {org = "ballerina", name = "lang.value"}, {org = "ballerina", name = "observe"} ] -modules = [ - {org = "ballerina", packageName = "log", moduleName = "log"} -] [[package]] org = "ballerina" From d0d977612c9cc609803f67ab55036661f4de2d45 Mon Sep 17 00:00:00 2001 From: Thisaru Guruge Date: Mon, 27 Jan 2025 20:45:50 +0530 Subject: [PATCH 5/5] Remove connection closure --- .../tests/01_dataloader_tests.bal | 1 - .../five/tests/01_subscription_five_tests.bal | 2 -- .../five/tests/02_subscription_with_context.bal | 2 -- .../tests/03_subscription_with_constraint.bal | 3 --- .../four/tests/01_subscription_four_tests.bal | 7 ------- .../modules/one/tests/01_subscription_tests.bal | 7 ------- .../six/tests/01_subscription_six_tests.bal | 1 - .../tests/01_subscription_with_interceptors.bal | 17 ----------------- .../three/tests/01_subscription_three_tests.bal | 7 ------- .../two/tests/01_subscription_two_tests.bal | 9 --------- ballerina-tests/graphql-test-common/utils.bal | 13 ------------- 11 files changed, 69 deletions(-) diff --git a/ballerina-tests/graphql-dataloader-test-suite/tests/01_dataloader_tests.bal b/ballerina-tests/graphql-dataloader-test-suite/tests/01_dataloader_tests.bal index 1d454700f..d7add8750 100644 --- a/ballerina-tests/graphql-dataloader-test-suite/tests/01_dataloader_tests.bal +++ b/ballerina-tests/graphql-dataloader-test-suite/tests/01_dataloader_tests.bal @@ -64,7 +64,6 @@ isolated function testDataLoaderWithSubscription() returns error? { check common:validateNextMessage(wsClient, expectedMsgPayload, id = "1"); } assertDispatchCountForBookLoader(5); - common:closeWebsocketClient(wsClient); } @test:Config { diff --git a/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/01_subscription_five_tests.bal b/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/01_subscription_five_tests.bal index daf1aff5f..d00a126bf 100644 --- a/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/01_subscription_five_tests.bal +++ b/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/01_subscription_five_tests.bal @@ -51,6 +51,4 @@ function testAttachServiceWithSubscriptionToHttp1BasedListener() returns error? check common:validateNextMessage(wsClient1, expectedMsgPayload, id = "1"); check common:validateNextMessage(wsClient2, expectedMsgPayload, id = "2"); } - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } diff --git a/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/02_subscription_with_context.bal b/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/02_subscription_with_context.bal index 6cc23543b..76b55fcc6 100644 --- a/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/02_subscription_with_context.bal +++ b/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/02_subscription_with_context.bal @@ -37,7 +37,6 @@ isolated function testContextWithSubscriptions() returns error? { json expectedMsgPayload = {data: {messages: i}}; check common:validateNextMessage(wsClient, expectedMsgPayload); } - common:closeWebsocketClient(wsClient); } @test:Config { @@ -63,5 +62,4 @@ isolated function testContextWithInvalidScopeInSubscriptions() returns error? { } ]; check common:validateErrorMessage(wsClient, expectedErrorPayload); - common:closeWebsocketClient(wsClient); } diff --git a/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/03_subscription_with_constraint.bal b/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/03_subscription_with_constraint.bal index e4cb48c8e..752b0a158 100644 --- a/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/03_subscription_with_constraint.bal +++ b/ballerina-tests/graphql-subscription-test-suite/modules/five/tests/03_subscription_with_constraint.bal @@ -30,7 +30,6 @@ isolated function testSubscriptionWithConstraints() returns error? { check common:sendSubscriptionMessage(wsClient, document, operationName = "Sub"); json expectedMsgPayload = check common:getJsonContentFromFile("constraints_with_subscription"); check common:validateErrorMessage(wsClient, expectedMsgPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -51,6 +50,4 @@ isolated function testMultipleSubscriptionClientsWithConstraints() returns error json expectedMsgPayload = check common:getJsonContentFromFile("constraints_with_subscription"); check common:validateErrorMessage(wsClient1, expectedMsgPayload, "1"); check common:validateErrorMessage(wsClient2, expectedMsgPayload, "2"); - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } diff --git a/ballerina-tests/graphql-subscription-test-suite/modules/four/tests/01_subscription_four_tests.bal b/ballerina-tests/graphql-subscription-test-suite/modules/four/tests/01_subscription_four_tests.bal index 846f82e3a..731e2433a 100644 --- a/ballerina-tests/graphql-subscription-test-suite/modules/four/tests/01_subscription_four_tests.bal +++ b/ballerina-tests/graphql-subscription-test-suite/modules/four/tests/01_subscription_four_tests.bal @@ -52,7 +52,6 @@ isolated function testSubscriptionMultiplexing() returns error? { json expectedPayload = {'type: common:WS_NEXT, id: subscriptionId, payload: payload}; test:assertEquals(actualPayload, expectedPayload); } - common:closeWebsocketClient(wsClient); } @test:Config { @@ -67,7 +66,6 @@ isolated function testInvalidWebSocketRequestWithEmptyQuery() returns error? { check common:sendSubscriptionMessage(wsClient, document); json expectedMsgPayload = {errors: [{message: "An empty query is found"}]}; check common:validateErrorMessage(wsClient, expectedMsgPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -83,7 +81,6 @@ isolated function testInvalidWebSocketRequestWithInvalidQuery() returns error? { string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" + " 'graphql-transport-ws' subprotocol: Status code: 1003"; common:validateConnectionClosureWithError(wsClient, expectedErrorMsg); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -98,7 +95,6 @@ isolated function testInvalidWebSocketRequestWithoutQuery() returns error? { string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" + " 'graphql-transport-ws' subprotocol: Status code: 1003"; common:validateConnectionClosureWithError(wsClient, expectedErrorMsg); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -115,7 +111,6 @@ isolated function testInvalidVariableInWebSocketPayload() returns error? { string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" + " 'graphql-transport-ws' subprotocol: Status code: 1003"; common:validateConnectionClosureWithError(wsClient, expectedErrorMsg); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -130,7 +125,6 @@ isolated function testEmptyWebSocketPayload() returns error? { string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" + " 'graphql-transport-ws' subprotocol: Status code: 1003"; common:validateConnectionClosureWithError(wsClient, expectedErrorMsg); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -144,5 +138,4 @@ isolated function testInvalidWebSocketPayload() returns error? { string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" + " 'graphql-transport-ws' subprotocol: Status code: 1003"; common:validateConnectionClosureWithError(wsClient, expectedErrorMsg); - common:closeWebsocketClient(wsClient); } diff --git a/ballerina-tests/graphql-subscription-test-suite/modules/one/tests/01_subscription_tests.bal b/ballerina-tests/graphql-subscription-test-suite/modules/one/tests/01_subscription_tests.bal index 7ca0b940a..8cf319786 100644 --- a/ballerina-tests/graphql-subscription-test-suite/modules/one/tests/01_subscription_tests.bal +++ b/ballerina-tests/graphql-subscription-test-suite/modules/one/tests/01_subscription_tests.bal @@ -33,7 +33,6 @@ isolated function testSubscription() returns error? { check common:validateNextMessage(wsClient, expectedMsgPayload); expectedMsgPayload = {data: {name: "Skyler"}}; check common:validateNextMessage(wsClient, expectedMsgPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -74,8 +73,6 @@ isolated function testSubscriptionsWithMultipleOperations() returns error? { json actualPayload = check common:getJsonPayloadFromService(httpUrl, document, operationName = "getName"); json expectedPayload = {data: {name: "Walter White"}}; common:assertJsonValuesWithOrder(actualPayload, expectedPayload); - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } @test:Config { @@ -93,7 +90,6 @@ isolated function testSubscriptionWithRecords() returns error? { check common:validateNextMessage(wsClient, expectedMsgPayload); expectedMsgPayload = {data: {books: {name: "A Game of Thrones", author: "George R.R. Martin"}}}; check common:validateNextMessage(wsClient, expectedMsgPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -122,7 +118,6 @@ isolated function testSubscriptionWithFragments() returns error? { check common:validateNextMessage(wsClient, expectedMsgPayload); expectedMsgPayload = {data: {students: {id: 2, name: "Mikasa Ackerman"}}}; check common:validateNextMessage(wsClient, expectedMsgPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -140,7 +135,6 @@ isolated function testSubscriptionWithUnionType() returns error? { check common:validateNextMessage(wsClient, expectedMsgPayload); expectedMsgPayload = {data: {multipleValues: {name: "Walter White", subject: "Chemistry"}}}; check common:validateNextMessage(wsClient, expectedMsgPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -159,5 +153,4 @@ isolated function testSubscriptionWithVariables() returns error? { json expectedMsgPayload = {data: {filterValues: i}}; check common:validateNextMessage(wsClient, expectedMsgPayload); } - common:closeWebsocketClient(wsClient); } diff --git a/ballerina-tests/graphql-subscription-test-suite/modules/six/tests/01_subscription_six_tests.bal b/ballerina-tests/graphql-subscription-test-suite/modules/six/tests/01_subscription_six_tests.bal index 7ef646bcf..3576611c8 100644 --- a/ballerina-tests/graphql-subscription-test-suite/modules/six/tests/01_subscription_six_tests.bal +++ b/ballerina-tests/graphql-subscription-test-suite/modules/six/tests/01_subscription_six_tests.bal @@ -37,5 +37,4 @@ isolated function testConnectionClosureWhenPongNotReceived() returns error? { } test:assertTrue(response is error, "Expected connection closure error"); test:assertEquals((response).message(), "Request timeout: Status code: 4408"); - common:closeWebsocketClient(wsClient); } diff --git a/ballerina-tests/graphql-subscription-test-suite/modules/six/tests/01_subscription_with_interceptors.bal b/ballerina-tests/graphql-subscription-test-suite/modules/six/tests/01_subscription_with_interceptors.bal index fa32b2770..f61e6575e 100644 --- a/ballerina-tests/graphql-subscription-test-suite/modules/six/tests/01_subscription_with_interceptors.bal +++ b/ballerina-tests/graphql-subscription-test-suite/modules/six/tests/01_subscription_with_interceptors.bal @@ -38,8 +38,6 @@ isolated function testInterceptorsWithSubscriptionReturningScalar() returns erro check common:validateNextMessage(wsClient1, expectedMsgPayload, id = "1"); check common:validateNextMessage(wsClient2, expectedMsgPayload, id = "2"); } - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } @test:Config { @@ -62,8 +60,6 @@ isolated function testInterceptorsWithSubscriptionReturningRecord() returns erro check common:sendSubscriptionMessage(wsClient2, document, operationName = "B"); expectedMsgPayload = {data: {newBooks: {name: "A Game of Thrones", author: "George R.R. Martin"}}}; check common:validateNextMessage(wsClient2, expectedMsgPayload); - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } @test:Config { @@ -86,8 +82,6 @@ isolated function testInterceptorsWithSubscriptionAndFragments() returns error? check common:sendSubscriptionMessage(wsClient2, document, operationName = "getNewStudents"); expectedMsgPayload = {data: {newStudents: {id: 4, name: "Ron Weasley"}}}; check common:validateNextMessage(wsClient2, expectedMsgPayload); - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } @test:Config { @@ -131,8 +125,6 @@ isolated function testInterceptorsWithUnionTypeSubscription() returns error? { } }; check common:validateNextMessage(wsClient2, expectedMsgPayload); - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } @test:Config { @@ -155,8 +147,6 @@ isolated function testInterceptorsReturnBeforeResolverWithSubscription() returns check common:validateNextMessage(wsClient1, expectedMsgPayload, id = "1"); check common:validateNextMessage(wsClient2, expectedMsgPayload, id = "2"); } - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } @test:Config { @@ -205,8 +195,6 @@ isolated function testInterceptorsDestructiveModificationWithSubscription() retu check common:validateNextMessage(wsClient1, expectedMsgPayload, id = "1"); check common:validateNextMessage(wsClient2, expectedMsgPayload, id = "2"); } - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } @test:Config { @@ -246,9 +234,6 @@ isolated function testInterceptorsWithSubscribersRunSimultaniously1() returns er } check wait A; check wait B; - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); - common:closeWebsocketClient(wsClient3); } @test:Config { @@ -308,6 +293,4 @@ isolated function testInterceptorsWithSubscribersRunSimultaniously2() returns er } check wait A; check wait B; - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } diff --git a/ballerina-tests/graphql-subscription-test-suite/modules/three/tests/01_subscription_three_tests.bal b/ballerina-tests/graphql-subscription-test-suite/modules/three/tests/01_subscription_three_tests.bal index f5c57530e..f65b0eeb6 100644 --- a/ballerina-tests/graphql-subscription-test-suite/modules/three/tests/01_subscription_three_tests.bal +++ b/ballerina-tests/graphql-subscription-test-suite/modules/three/tests/01_subscription_three_tests.bal @@ -48,7 +48,6 @@ function testAlreadyExistingSubscriber() returns error? { } } test:assertEquals((response).message(), expectedErrorMsg); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -61,7 +60,6 @@ isolated function testOnPing() returns error? { check wsClient->writeMessage({'type: common:WS_PING}); json response = check wsClient->readMessage(); test:assertEquals(response.'type, common:WS_PONG); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -94,7 +92,6 @@ isolated function testErrorsInStreams() returns error? { check common:validateNextMessage(wsClient, expectedMsgPayload); expectedMsgPayload = {data: {evenNumber: 6}}; check common:validateNextMessage(wsClient, expectedMsgPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -120,7 +117,6 @@ isolated function testMultipleSubscriptionUsingSingleClient() returns error? { check common:validateNextMessage(wsClient, expectedMsgPayload, id = "2"); } check common:validateCompleteMessage(wsClient, id = "2"); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -137,7 +133,6 @@ isolated function testSubscriptionWithInvalidPayload() returns error? { string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" + " 'graphql-transport-ws' subprotocol: Status code: 1003"; common:validateConnectionClosureWithError(wsClient, expectedErrorMsg); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -153,7 +148,6 @@ isolated function testResolverReturingStreamOfRecordsWithServiceObjects() return json expectedPayload = {data: {live: {product: {id: "1"}, score: 20}}}; check common:validateNextMessage(wsClient, expectedPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -171,5 +165,4 @@ isolated function testResolverReturingStreamOfRecordsWithMapOfServiceObjects() r check common:validateNextMessage(wsClient, expectedMsgPayload); expectedMsgPayload = {data: {accountUpdates: {details: {name: "James Deen"}}}}; check common:validateNextMessage(wsClient, expectedMsgPayload); - common:closeWebsocketClient(wsClient); } diff --git a/ballerina-tests/graphql-subscription-test-suite/modules/two/tests/01_subscription_two_tests.bal b/ballerina-tests/graphql-subscription-test-suite/modules/two/tests/01_subscription_two_tests.bal index 676e6e35b..35c3e3170 100644 --- a/ballerina-tests/graphql-subscription-test-suite/modules/two/tests/01_subscription_two_tests.bal +++ b/ballerina-tests/graphql-subscription-test-suite/modules/two/tests/01_subscription_two_tests.bal @@ -31,7 +31,6 @@ isolated function testSubscriptionWithIntrospectionInFields() returns error? { json expectedMsgPayload = {data: {students: {__typename: "StudentService"}}}; check common:validateNextMessage(wsClient, expectedMsgPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -47,7 +46,6 @@ isolated function testInvalidSubscription() returns error? { json expectedMsgPayload = check common:getJsonContentFromFile("subscription_invalid_field"); check common:validateErrorMessage(wsClient, expectedMsgPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -69,7 +67,6 @@ isolated function testSubscriptionFunctionWithErrors() returns error? { } ]; check common:validateErrorMessage(wsClient, expectedErrorPayload); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -88,7 +85,6 @@ isolated function testSubscriptionWithServiceObjects() returns error? { expectedMsgPayload = {data: {students: {id: 2, name: "Mikasa Ackerman"}}}; check common:validateNextMessage(wsClient, expectedMsgPayload); check common:validateCompleteMessage(wsClient); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -114,8 +110,6 @@ isolated function testSubscriptionWithMultipleClients() returns error? { } check common:validateCompleteMessage(wsClient1, id = "1"); check common:validateCompleteMessage(wsClient2, id = "2"); - common:closeWebsocketClient(wsClient1); - common:closeWebsocketClient(wsClient2); } @test:Config { @@ -127,7 +121,6 @@ isolated function testConnectionInitMessage() returns error? { websocket:Client wsClient = check new (url, config); check common:sendConnectionInitMessage(wsClient); check common:validateConnectionAckMessage(wsClient); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -142,7 +135,6 @@ isolated function testInvalidMultipleConnectionInitMessages() returns error? { string expectedErrorMsg = "Too many initialisation requests: Status code: 4429"; common:validateConnectionClosureWithError(wsClient, expectedErrorMsg); - common:closeWebsocketClient(wsClient); } @test:Config { @@ -157,5 +149,4 @@ isolated function testUnauthorizedAccess() returns error? { string expectedErrorMsg = "Unauthorized: Status code: 4401"; common:validateConnectionClosureWithError(wsClient, expectedErrorMsg); - common:closeWebsocketClient(wsClient); } diff --git a/ballerina-tests/graphql-test-common/utils.bal b/ballerina-tests/graphql-test-common/utils.bal index 708bec983..aea5de649 100644 --- a/ballerina-tests/graphql-test-common/utils.bal +++ b/ballerina-tests/graphql-test-common/utils.bal @@ -18,7 +18,6 @@ import ballerina/file; import ballerina/graphql; import ballerina/http; import ballerina/io; -import ballerina/log; import ballerina/test; import ballerina/websocket; @@ -179,15 +178,3 @@ public isolated function validateConnectionClosureWithError(websocket:Client wsC } test:assertFail(string `Unexpected Error found : ${response.toString()}`); } - -public isolated function closeWebsocketClient(websocket:Client wsClient) { - string id = wsClient.getConnectionId(); - error? result = wsClient->writeMessage({'type: WS_COMPLETE, id}); - if result is error { - log:printError("Error occurred while sending the complete message: ", result); - } - result = wsClient->close(timeout = 1); - if result is error { - log:printError("Error occurred while closing the websocket client: ", result); - } -}