Skip to content

Commit

Permalink
Re-enanble tests in code and disable from workflow (#2119)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisaruGuruge authored Dec 10, 2024
1 parent 35b4c8c commit 6b79fca
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 55 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-timestamped-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ jobs:
if: ${{ github.repository_owner == 'ballerina-platform' }}
uses: ballerina-platform/ballerina-library/.github/workflows/build-timestamp-master-template.yml@main
secrets: inherit
with:
additional-build-flags: "-x test"
3 changes: 2 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ jobs:
uses: ballerina-platform/ballerina-library/.github/workflows/pull-request-build-template.yml@main
secrets: inherit
with:
additional-ubuntu-test-flags: "-Pdisable=subscriptions"
additional-ubuntu-test-flags: "-x test"
additional-windows-test-flags: "-x test"
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ isolated function testDataLoaderWithQuery() returns error? {

@test:Config {
groups: ["dataloader", "query"],
after: resetDispatchCounters,
enable: false
after: resetDispatchCounters
}
isolated function testDataLoaderWithDifferentAliasForSameField() returns error? {
graphql:Client graphqlClient = check new ("localhost:9090/dataloader");
Expand All @@ -49,7 +48,6 @@ isolated function testDataLoaderWithDifferentAliasForSameField() returns error?
}

@test:Config {
enable: false,
groups: ["subscriptions", "dataloader"],
after: resetDispatchCounters
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import ballerina/http;
import ballerina/test;

@test:Config {
groups: ["listener", "graphiql"],
enable: false
groups: ["listener", "graphiql"]
}
function testGraphiqlWithSamePathAsGraphQLService() returns error? {
graphql:Error? result = basicListener.attach(graphiqlConfigService, "ballerina/graphiql");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import ballerina/test;
import ballerina/websocket;

@test:Config {
enable: false,
groups: ["listener", "subscriptions"]
}
function testAttachServiceWithSubscriptionToHttp2BasedListener() returns error? {
Expand All @@ -33,7 +32,6 @@ function testAttachServiceWithSubscriptionToHttp2BasedListener() returns error?
}

@test:Config {
enable: false,
groups: ["listener", "subscriptions"]
}
function testAttachServiceWithSubscriptionToHttp1BasedListener() returns error? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import ballerina/test;
import ballerina/websocket;

@test:Config {
enable: false,
groups: ["context", "subscriptions"]
}
isolated function testContextWithSubscriptions() returns error? {
Expand All @@ -41,7 +40,6 @@ isolated function testContextWithSubscriptions() returns error? {
}

@test:Config {
enable: false,
groups: ["context", "subscriptions"]
}
isolated function testContextWithInvalidScopeInSubscriptions() returns error? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import ballerina/test;
import ballerina/websocket;

@test:Config {
enable: false,
groups: ["constraints", "subscriptions"]
}
isolated function testSubscriptionWithConstraints() returns error? {
Expand All @@ -34,7 +33,6 @@ isolated function testSubscriptionWithConstraints() returns error? {
}

@test:Config {
enable: false,
groups: ["constraints", "subscriptions"]
}
isolated function testMultipleSubscriptionClientsWithConstraints() returns error? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import ballerina/test;
import ballerina/websocket;

@test:Config {
enable: false,
groups: ["subscriptions", "multiplexing"]
}
isolated function testSubscriptionMultiplexing() returns error? {
Expand Down Expand Up @@ -56,7 +55,6 @@ isolated function testSubscriptionMultiplexing() returns error? {
}

@test:Config {
enable: false,
groups: ["request_validation", "websocket", "subscriptions"]
}
isolated function testInvalidWebSocketRequestWithEmptyQuery() returns error? {
Expand All @@ -71,7 +69,6 @@ isolated function testInvalidWebSocketRequestWithEmptyQuery() returns error? {
}

@test:Config {
enable: false,
groups: ["request_validation", "websocket", "subscriptions"]
}
isolated function testInvalidWebSocketRequestWithInvalidQuery() returns error? {
Expand All @@ -87,7 +84,6 @@ isolated function testInvalidWebSocketRequestWithInvalidQuery() returns error? {
}

@test:Config {
enable: false,
groups: ["request_validation", "websocket", "subscriptions"]
}
isolated function testInvalidWebSocketRequestWithoutQuery() returns error? {
Expand All @@ -102,7 +98,6 @@ isolated function testInvalidWebSocketRequestWithoutQuery() returns error? {
}

@test:Config {
enable: false,
groups: ["request_validation", "websocket", "subscriptions"]
}
isolated function testInvalidVariableInWebSocketPayload() returns error? {
Expand All @@ -119,7 +114,6 @@ isolated function testInvalidVariableInWebSocketPayload() returns error? {
}

@test:Config {
enable: false,
groups: ["request_validation", "websocket", "subscriptions"]
}
isolated function testEmptyWebSocketPayload() returns error? {
Expand All @@ -134,7 +128,6 @@ isolated function testEmptyWebSocketPayload() returns error? {
}

@test:Config {
enable: false,
groups: ["request_validation", "websocket", "subscriptions"]
}
isolated function testInvalidWebSocketPayload() returns error? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import ballerina/test;
import ballerina/websocket;

@test:Config {
enable: false,
groups: ["subscriptions"]
}
isolated function testSubscription() returns error? {
Expand All @@ -37,7 +36,6 @@ isolated function testSubscription() returns error? {
}

@test:Config {
enable: false,
groups: ["subscriptions"]
}
isolated function testSubscriptionWithoutSubProtocol() returns error? {
Expand All @@ -49,7 +47,6 @@ isolated function testSubscriptionWithoutSubProtocol() returns error? {
}

@test:Config {
enable: false,
groups: ["subscriptions"]
}
isolated function testSubscriptionsWithMultipleOperations() returns error? {
Expand Down Expand Up @@ -79,7 +76,6 @@ isolated function testSubscriptionsWithMultipleOperations() returns error? {
}

@test:Config {
enable: false,
groups: ["records", "subscriptions"]
}
isolated function testSubscriptionWithRecords() returns error? {
Expand All @@ -97,7 +93,6 @@ isolated function testSubscriptionWithRecords() returns error? {
}

@test:Config {
enable: false,
groups: ["subscriptions"]
}
isolated function testQueryWithSameSubscriptionFieldName() returns error? {
Expand All @@ -109,7 +104,6 @@ isolated function testQueryWithSameSubscriptionFieldName() returns error? {
}

@test:Config {
enable: false,
groups: ["fragments", "subscriptions"]
}
isolated function testSubscriptionWithFragments() returns error? {
Expand All @@ -127,7 +121,6 @@ isolated function testSubscriptionWithFragments() returns error? {
}

@test:Config {
enable: false,
groups: ["union", "subscriptions"]
}
isolated function testSubscriptionWithUnionType() returns error? {
Expand All @@ -145,7 +138,6 @@ isolated function testSubscriptionWithUnionType() returns error? {
}

@test:Config {
enable: false,
groups: ["variables", "subscriptions"]
}
isolated function testSubscriptionWithVariables() returns error? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import ballerina/test;
import ballerina/websocket;

@test:Config {
enable: false,
groups: ["subscriptions", "service"]
}
isolated function testConnectionClousureWhenPongNotRecived() returns error? {
Expand All @@ -38,4 +37,4 @@ isolated function testConnectionClousureWhenPongNotRecived() returns error? {
}
test:assertTrue(response is error, "Expected connection clousure error");
test:assertEquals((<error>response).message(), "Request timeout: Status code: 4408");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import ballerina/test;
import ballerina/websocket;

@test:Config {
enable: false,
groups: ["interceptors", "subscriptions"]
}
isolated function testInterceptorsWithSubscriptionReturningScalar() returns error? {
Expand All @@ -42,7 +41,6 @@ isolated function testInterceptorsWithSubscriptionReturningScalar() returns erro
}

@test:Config {
enable: false,
groups: ["interceptors", "subscriptions", "records"]
}
isolated function testInterceptorsWithSubscriptionReturningRecord() returns error? {
Expand All @@ -65,7 +63,6 @@ isolated function testInterceptorsWithSubscriptionReturningRecord() returns erro
}

@test:Config {
enable: false,
groups: ["interceptors", "fragments", "subscriptions"]
}
isolated function testInterceptorsWithSubscriptionAndFragments() returns error? {
Expand All @@ -88,7 +85,6 @@ isolated function testInterceptorsWithSubscriptionAndFragments() returns error?
}

@test:Config {
enable: false,
groups: ["interceptors", "union", "subscriptions"]
}
isolated function testInterceptorsWithUnionTypeSubscription() returns error? {
Expand Down Expand Up @@ -132,7 +128,6 @@ isolated function testInterceptorsWithUnionTypeSubscription() returns error? {
}

@test:Config {
enable: false,
groups: ["interceptors", "subscriptions"]
}
isolated function testInterceptorsReturnBeforeResolverWithSubscription() returns error? {
Expand All @@ -155,7 +150,6 @@ isolated function testInterceptorsReturnBeforeResolverWithSubscription() returns
}

@test:Config {
enable: false,
groups: ["interceptors", "subscriptions"]
}
isolated function testInterceptorsDestructiveModificationWithSubscription() returns error? {
Expand Down Expand Up @@ -204,7 +198,6 @@ isolated function testInterceptorsDestructiveModificationWithSubscription() retu
}

@test:Config {
enable: false,
groups: ["interceptors", "subscriptions"]
}
isolated function testInterceptorsWithSubscribersRunSimultaniously1() returns error? {
Expand Down Expand Up @@ -244,7 +237,6 @@ isolated function testInterceptorsWithSubscribersRunSimultaniously1() returns er
}

@test:Config {
enable: false,
groups: ["interceptors", "union", "subscriptions"]
}
isolated function testInterceptorsWithSubscribersRunSimultaniously2() returns error? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import ballerina/test;
import ballerina/websocket;

@test:Config {
enable: false,
groups: ["subscriptions"]
}
function testAlreadyExistingSubscriber() returns error? {
Expand Down Expand Up @@ -52,7 +51,6 @@ function testAlreadyExistingSubscriber() returns error? {
}

@test:Config {
enable: false,
groups: ["subscriptions"]
}
isolated function testOnPing() returns error? {
Expand All @@ -65,7 +63,6 @@ isolated function testOnPing() returns error? {
}

@test:Config {
enable: false,
groups: ["subscriptions"]
}
isolated function testInvalidSubProtocolInSubscriptions() returns error? {
Expand All @@ -80,7 +77,6 @@ isolated function testInvalidSubProtocolInSubscriptions() returns error? {
}

@test:Config {
enable: false,
groups: ["subscriptions", "runtime_errors"]
}
isolated function testErrorsInStreams() returns error? {
Expand All @@ -100,7 +96,6 @@ isolated function testErrorsInStreams() returns error? {
}

@test:Config {
enable: false,
groups: ["subscriptions"]
}
isolated function testMultipleSubscriptionUsingSingleClient() returns error? {
Expand All @@ -126,7 +121,6 @@ isolated function testMultipleSubscriptionUsingSingleClient() returns error? {
}

@test:Config {
enable: false,
groups: ["subscriptions"]
}
isolated function testSubscriptionWithInvalidPayload() returns error? {
Expand All @@ -143,7 +137,6 @@ isolated function testSubscriptionWithInvalidPayload() returns error? {
}

@test:Config {
enable: false,
groups: ["subscriptions", "recrods", "service"]
}
isolated function testResolverReturingStreamOfRecordsWithServiceObjects() returns error? {
Expand All @@ -159,7 +152,6 @@ isolated function testResolverReturingStreamOfRecordsWithServiceObjects() return
}

@test:Config {
enable: false,
groups: ["subscriptions", "recrods", "service", "maps"]
}
isolated function testResolverReturingStreamOfRecordsWithMapOfServiceObjects() returns error? {
Expand Down
Loading

0 comments on commit 6b79fca

Please sign in to comment.