Skip to content

Commit ac90d53

Browse files
committed
Update dependencies and Disable hanging tests
1 parent 73ddff7 commit ac90d53

File tree

26 files changed

+144
-61
lines changed

26 files changed

+144
-61
lines changed

ballerina-tests/graphql-advanced-test-suite/Dependencies.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[ballerina]
77
dependencies-toml-version = "2"
8-
distribution-version = "2201.11.0-20241204-121300-fc33b755"
8+
distribution-version = "2201.11.0-20250121-140200-15de3b28"
99

1010
[[package]]
1111
org = "ballerina"
@@ -130,6 +130,7 @@ dependencies = [
130130
{org = "ballerina", name = "graphql"},
131131
{org = "ballerina", name = "http"},
132132
{org = "ballerina", name = "io"},
133+
{org = "ballerina", name = "log"},
133134
{org = "ballerina", name = "test"},
134135
{org = "ballerina", name = "websocket"}
135136
]

ballerina-tests/graphql-client-test-suite/Dependencies.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[ballerina]
77
dependencies-toml-version = "2"
8-
distribution-version = "2201.11.0-20241204-121300-fc33b755"
8+
distribution-version = "2201.11.0-20250121-140200-15de3b28"
99

1010
[[package]]
1111
org = "ballerina"
@@ -129,6 +129,7 @@ dependencies = [
129129
{org = "ballerina", name = "graphql"},
130130
{org = "ballerina", name = "http"},
131131
{org = "ballerina", name = "io"},
132+
{org = "ballerina", name = "log"},
132133
{org = "ballerina", name = "test"},
133134
{org = "ballerina", name = "websocket"}
134135
]

ballerina-tests/graphql-dataloader-test-suite/Dependencies.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[ballerina]
77
dependencies-toml-version = "2"
8-
distribution-version = "2201.11.0-20241204-121300-fc33b755"
8+
distribution-version = "2201.11.0-20250121-140200-15de3b28"
99

1010
[[package]]
1111
org = "ballerina"
@@ -131,6 +131,7 @@ dependencies = [
131131
{org = "ballerina", name = "graphql"},
132132
{org = "ballerina", name = "http"},
133133
{org = "ballerina", name = "io"},
134+
{org = "ballerina", name = "log"},
134135
{org = "ballerina", name = "test"},
135136
{org = "ballerina", name = "websocket"}
136137
]

ballerina-tests/graphql-dataloader-test-suite/tests/01_dataloader_tests.bal

+5-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ isolated function testDataLoaderWithDifferentAliasForSameField() returns error?
4949

5050
@test:Config {
5151
groups: ["subscriptions", "dataloader"],
52-
after: resetDispatchCounters
52+
after: resetDispatchCounters,
53+
enable: false
5354
}
5455
isolated function testDataLoaderWithSubscription() returns error? {
5556
string document = check common:getGraphqlDocumentFromFile("dataloader_with_subscription");
@@ -63,14 +64,16 @@ isolated function testDataLoaderWithSubscription() returns error? {
6364
check common:validateNextMessage(wsClient, expectedMsgPayload, id = "1");
6465
}
6566
assertDispatchCountForBookLoader(5);
67+
common:closeWebsocketClient(wsClient);
6668
}
6769

6870
@test:Config {
6971
groups: ["dataloader", "mutation"],
7072
dependsOn: [
7173
testDataLoaderWithQuery, testDataLoaderWithSubscription
7274
],
73-
after: resetDispatchCounters
75+
after: resetDispatchCounters,
76+
enable: false
7477
}
7578
isolated function testDataLoaderWithMutation() returns error? {
7679
graphql:Client graphqlClient = check new ("localhost:9090/dataloader");

ballerina-tests/graphql-interceptor-test-suite/Dependencies.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[ballerina]
77
dependencies-toml-version = "2"
8-
distribution-version = "2201.11.0-20241204-121300-fc33b755"
8+
distribution-version = "2201.11.0-20250121-140200-15de3b28"
99

1010
[[package]]
1111
org = "ballerina"
@@ -131,6 +131,7 @@ dependencies = [
131131
{org = "ballerina", name = "graphql"},
132132
{org = "ballerina", name = "http"},
133133
{org = "ballerina", name = "io"},
134+
{org = "ballerina", name = "log"},
134135
{org = "ballerina", name = "test"},
135136
{org = "ballerina", name = "websocket"}
136137
]

ballerina-tests/graphql-security-test-suite/Dependencies.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[ballerina]
77
dependencies-toml-version = "2"
8-
distribution-version = "2201.11.0-20241204-121300-fc33b755"
8+
distribution-version = "2201.11.0-20250121-140200-15de3b28"
99

1010
[[package]]
1111
org = "ballerina"
@@ -130,6 +130,7 @@ dependencies = [
130130
{org = "ballerina", name = "graphql"},
131131
{org = "ballerina", name = "http"},
132132
{org = "ballerina", name = "io"},
133+
{org = "ballerina", name = "log"},
133134
{org = "ballerina", name = "test"},
134135
{org = "ballerina", name = "websocket"}
135136
]

ballerina-tests/graphql-service-test-suite/Dependencies.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[ballerina]
77
dependencies-toml-version = "2"
8-
distribution-version = "2201.11.0-20241204-121300-fc33b755"
8+
distribution-version = "2201.11.0-20250121-140200-15de3b28"
99

1010
[[package]]
1111
org = "ballerina"
@@ -127,6 +127,7 @@ dependencies = [
127127
{org = "ballerina", name = "graphql"},
128128
{org = "ballerina", name = "http"},
129129
{org = "ballerina", name = "io"},
130+
{org = "ballerina", name = "log"},
130131
{org = "ballerina", name = "test"},
131132
{org = "ballerina", name = "websocket"}
132133
]

ballerina-tests/graphql-subgraph-test-suite/Dependencies.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[ballerina]
77
dependencies-toml-version = "2"
8-
distribution-version = "2201.11.0-20241204-121300-fc33b755"
8+
distribution-version = "2201.11.0-20250121-140200-15de3b28"
99

1010
[[package]]
1111
org = "ballerina"
@@ -122,6 +122,7 @@ dependencies = [
122122
{org = "ballerina", name = "graphql"},
123123
{org = "ballerina", name = "http"},
124124
{org = "ballerina", name = "io"},
125+
{org = "ballerina", name = "log"},
125126
{org = "ballerina", name = "test"},
126127
{org = "ballerina", name = "websocket"}
127128
]

ballerina-tests/graphql-subscription-test-suite/Dependencies.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
[ballerina]
77
dependencies-toml-version = "2"
8-
distribution-version = "2201.11.0-20241204-121300-fc33b755"
8+
distribution-version = "2201.11.0-20250121-140200-15de3b28"
99

1010
[[package]]
1111
org = "ballerina"
@@ -142,6 +142,7 @@ dependencies = [
142142
{org = "ballerina", name = "graphql"},
143143
{org = "ballerina", name = "http"},
144144
{org = "ballerina", name = "io"},
145+
{org = "ballerina", name = "log"},
145146
{org = "ballerina", name = "test"},
146147
{org = "ballerina", name = "websocket"}
147148
]

ballerina-tests/graphql-subscription-test-suite/modules/five/tests/01_subscription_five_tests.bal

+4-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ function testAttachServiceWithSubscriptionToHttp2BasedListener() returns error?
2626
graphql:Error? result = http2BasedListener.attach(subscriptionService);
2727
test:assertTrue(result is graphql:Error);
2828
graphql:Error err = <graphql:Error>result;
29-
string expecctedMessage = string `Websocket listener initialization failed due to the incompatibility of ` +
29+
string expectedMessage = string `Websocket listener initialization failed due to the incompatibility of ` +
3030
string `provided HTTP(version 2.0) listener`;
31-
test:assertEquals(err.message(), expecctedMessage);
31+
test:assertEquals(err.message(), expectedMessage);
3232
}
3333

3434
@test:Config {
@@ -51,4 +51,6 @@ function testAttachServiceWithSubscriptionToHttp1BasedListener() returns error?
5151
check common:validateNextMessage(wsClient1, expectedMsgPayload, id = "1");
5252
check common:validateNextMessage(wsClient2, expectedMsgPayload, id = "2");
5353
}
54+
common:closeWebsocketClient(wsClient1);
55+
common:closeWebsocketClient(wsClient2);
5456
}

ballerina-tests/graphql-subscription-test-suite/modules/five/tests/02_subscription_with_context.bal

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ isolated function testContextWithSubscriptions() returns error? {
3737
json expectedMsgPayload = {data: {messages: i}};
3838
check common:validateNextMessage(wsClient, expectedMsgPayload);
3939
}
40+
common:closeWebsocketClient(wsClient);
4041
}
4142

4243
@test:Config {
@@ -62,4 +63,5 @@ isolated function testContextWithInvalidScopeInSubscriptions() returns error? {
6263
}
6364
];
6465
check common:validateErrorMessage(wsClient, expectedErrorPayload);
66+
common:closeWebsocketClient(wsClient);
6567
}

ballerina-tests/graphql-subscription-test-suite/modules/five/tests/03_subscription_with_constraint.bal

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ isolated function testSubscriptionWithConstraints() returns error? {
3030
check common:sendSubscriptionMessage(wsClient, document, operationName = "Sub");
3131
json expectedMsgPayload = check common:getJsonContentFromFile("constraints_with_subscription");
3232
check common:validateErrorMessage(wsClient, expectedMsgPayload);
33+
common:closeWebsocketClient(wsClient);
3334
}
3435

3536
@test:Config {
@@ -50,4 +51,6 @@ isolated function testMultipleSubscriptionClientsWithConstraints() returns error
5051
json expectedMsgPayload = check common:getJsonContentFromFile("constraints_with_subscription");
5152
check common:validateErrorMessage(wsClient1, expectedMsgPayload, "1");
5253
check common:validateErrorMessage(wsClient2, expectedMsgPayload, "2");
54+
common:closeWebsocketClient(wsClient1);
55+
common:closeWebsocketClient(wsClient2);
5356
}

ballerina-tests/graphql-subscription-test-suite/modules/four/tests/01_subscription_four_tests.bal

+12-5
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ isolated function testSubscriptionMultiplexing() returns error? {
5252
json expectedPayload = {'type: common:WS_NEXT, id: subscriptionId, payload: payload};
5353
test:assertEquals(actualPayload, expectedPayload);
5454
}
55+
common:closeWebsocketClient(wsClient);
5556
}
5657

5758
@test:Config {
@@ -66,6 +67,7 @@ isolated function testInvalidWebSocketRequestWithEmptyQuery() returns error? {
6667
check common:sendSubscriptionMessage(wsClient, document);
6768
json expectedMsgPayload = {errors: [{message: "An empty query is found"}]};
6869
check common:validateErrorMessage(wsClient, expectedMsgPayload);
70+
common:closeWebsocketClient(wsClient);
6971
}
7072

7173
@test:Config {
@@ -80,7 +82,8 @@ isolated function testInvalidWebSocketRequestWithInvalidQuery() returns error? {
8082
check wsClient->writeMessage({"type": common:WS_SUBSCRIBE, id: "1", payload: payload});
8183
string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" +
8284
" 'graphql-transport-ws' subprotocol: Status code: 1003";
83-
common:validateConnectionClousureWithError(wsClient, expectedErrorMsg);
85+
common:validateConnectionClosureWithError(wsClient, expectedErrorMsg);
86+
common:closeWebsocketClient(wsClient);
8487
}
8588

8689
@test:Config {
@@ -94,7 +97,8 @@ isolated function testInvalidWebSocketRequestWithoutQuery() returns error? {
9497
check wsClient->writeMessage({"type": common:WS_SUBSCRIBE, id: "1", payload: {}});
9598
string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" +
9699
" 'graphql-transport-ws' subprotocol: Status code: 1003";
97-
common:validateConnectionClousureWithError(wsClient, expectedErrorMsg);
100+
common:validateConnectionClosureWithError(wsClient, expectedErrorMsg);
101+
common:closeWebsocketClient(wsClient);
98102
}
99103

100104
@test:Config {
@@ -110,7 +114,8 @@ isolated function testInvalidVariableInWebSocketPayload() returns error? {
110114
check common:sendSubscriptionMessage(wsClient, document, variables = variables);
111115
string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" +
112116
" 'graphql-transport-ws' subprotocol: Status code: 1003";
113-
common:validateConnectionClousureWithError(wsClient, expectedErrorMsg);
117+
common:validateConnectionClosureWithError(wsClient, expectedErrorMsg);
118+
common:closeWebsocketClient(wsClient);
114119
}
115120

116121
@test:Config {
@@ -124,7 +129,8 @@ isolated function testEmptyWebSocketPayload() returns error? {
124129
check wsClient->writeMessage(payload);
125130
string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the" +
126131
" 'graphql-transport-ws' subprotocol: Status code: 1003";
127-
common:validateConnectionClousureWithError(wsClient, expectedErrorMsg);
132+
common:validateConnectionClosureWithError(wsClient, expectedErrorMsg);
133+
common:closeWebsocketClient(wsClient);
128134
}
129135

130136
@test:Config {
@@ -137,5 +143,6 @@ isolated function testInvalidWebSocketPayload() returns error? {
137143
check wsClient->writeMessage(payload);
138144
string expectedErrorMsg = "Invalid format: payload does not conform to the format required by the"
139145
+ " 'graphql-transport-ws' subprotocol: Status code: 1003";
140-
common:validateConnectionClousureWithError(wsClient, expectedErrorMsg);
146+
common:validateConnectionClosureWithError(wsClient, expectedErrorMsg);
147+
common:closeWebsocketClient(wsClient);
141148
}

ballerina-tests/graphql-subscription-test-suite/modules/one/tests/01_subscription_tests.bal

+7
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ isolated function testSubscription() returns error? {
3333
check common:validateNextMessage(wsClient, expectedMsgPayload);
3434
expectedMsgPayload = {data: {name: "Skyler"}};
3535
check common:validateNextMessage(wsClient, expectedMsgPayload);
36+
common:closeWebsocketClient(wsClient);
3637
}
3738

3839
@test:Config {
@@ -73,6 +74,8 @@ isolated function testSubscriptionsWithMultipleOperations() returns error? {
7374
json actualPayload = check common:getJsonPayloadFromService(httpUrl, document, operationName = "getName");
7475
json expectedPayload = {data: {name: "Walter White"}};
7576
common:assertJsonValuesWithOrder(actualPayload, expectedPayload);
77+
common:closeWebsocketClient(wsClient1);
78+
common:closeWebsocketClient(wsClient2);
7679
}
7780

7881
@test:Config {
@@ -90,6 +93,7 @@ isolated function testSubscriptionWithRecords() returns error? {
9093
check common:validateNextMessage(wsClient, expectedMsgPayload);
9194
expectedMsgPayload = {data: {books: {name: "A Game of Thrones", author: "George R.R. Martin"}}};
9295
check common:validateNextMessage(wsClient, expectedMsgPayload);
96+
common:closeWebsocketClient(wsClient);
9397
}
9498

9599
@test:Config {
@@ -118,6 +122,7 @@ isolated function testSubscriptionWithFragments() returns error? {
118122
check common:validateNextMessage(wsClient, expectedMsgPayload);
119123
expectedMsgPayload = {data: {students: {id: 2, name: "Mikasa Ackerman"}}};
120124
check common:validateNextMessage(wsClient, expectedMsgPayload);
125+
common:closeWebsocketClient(wsClient);
121126
}
122127

123128
@test:Config {
@@ -135,6 +140,7 @@ isolated function testSubscriptionWithUnionType() returns error? {
135140
check common:validateNextMessage(wsClient, expectedMsgPayload);
136141
expectedMsgPayload = {data: {multipleValues: {name: "Walter White", subject: "Chemistry"}}};
137142
check common:validateNextMessage(wsClient, expectedMsgPayload);
143+
common:closeWebsocketClient(wsClient);
138144
}
139145

140146
@test:Config {
@@ -153,4 +159,5 @@ isolated function testSubscriptionWithVariables() returns error? {
153159
json expectedMsgPayload = {data: {filterValues: i}};
154160
check common:validateNextMessage(wsClient, expectedMsgPayload);
155161
}
162+
common:closeWebsocketClient(wsClient);
156163
}

ballerina-tests/graphql-subscription-test-suite/modules/six/tests/01_subscription_six_tests.bal

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import ballerina/websocket;
2121
@test:Config {
2222
groups: ["subscriptions", "service"]
2323
}
24-
isolated function testConnectionClousureWhenPongNotRecived() returns error? {
24+
isolated function testConnectionClosureWhenPongNotReceived() returns error? {
2525
string url = "ws://localhost:9091/subscription_interceptor1";
2626
websocket:ClientConfiguration config = {subProtocols: [common:GRAPHQL_TRANSPORT_WS]};
2727
websocket:Client wsClient = check new (url, config);
@@ -35,6 +35,7 @@ isolated function testConnectionClousureWhenPongNotRecived() returns error? {
3535
}
3636
break;
3737
}
38-
test:assertTrue(response is error, "Expected connection clousure error");
38+
test:assertTrue(response is error, "Expected connection closure error");
3939
test:assertEquals((<error>response).message(), "Request timeout: Status code: 4408");
40+
common:closeWebsocketClient(wsClient);
4041
}

0 commit comments

Comments
 (0)