Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporary disable Graphql-model-generator tests for windows #222

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@
import org.ballerinalang.langserver.util.TestUtil;
import org.eclipse.lsp4j.jsonrpc.Endpoint;
import org.testng.Assert;
import org.testng.SkipException;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Locale;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

Expand All @@ -42,6 +44,7 @@ public class GraphqlModelGeneratorServiceTests {
private static final String BALLERINA = "ballerina";
private static final String RESPONSES = "responses";
private static final String PROJECT_DESIGN_SERVICE = "graphqlDesignService/getGraphqlModel";
private static final String OS = System.getProperty("os.name", "unknown").toLowerCase(Locale.ROOT);

private Endpoint serviceEndpoint;

Expand All @@ -52,6 +55,9 @@ public void startLanguageServer() {

@Test(description = "test service with operations, outputs(enum,record,class), documentation and directives")
public void testDifferentOutputsAndOperations() throws IOException, ExecutionException, InterruptedException {
if (OS.contains("win")) {
throw new SkipException("Skipping this test on Windows");
}
Path projectPath = RES_DIR.resolve(BALLERINA).resolve(
Path.of("graphql_services", "01_graphql_service.bal"));

Expand All @@ -65,6 +71,9 @@ public void testDifferentOutputsAndOperations() throws IOException, ExecutionExc

@Test(description = "test service with input objects")
public void testInputObjects() throws IOException, ExecutionException, InterruptedException {
if (OS.contains("win")) {
throw new SkipException("Skipping this test on Windows");
}
Path projectPath = RES_DIR.resolve(BALLERINA).resolve(
Path.of("graphql_services", "02_graphql_service.bal"));

Expand All @@ -77,6 +86,9 @@ public void testInputObjects() throws IOException, ExecutionException, Interrupt

@Test(description = "test service with interfaces")
public void testServiceWithInterfaces() throws IOException, ExecutionException, InterruptedException {
if (OS.contains("win")) {
throw new SkipException("Skipping this test on Windows");
}
Path projectPath = RES_DIR.resolve(BALLERINA).resolve(
Path.of("graphql_services", "03_service_with_interfaces.bal"));

Expand All @@ -89,6 +101,9 @@ public void testServiceWithInterfaces() throws IOException, ExecutionException,

@Test(description = "test service with union output")
public void testServiceWithUnionOutput() throws IOException, ExecutionException, InterruptedException {
if (OS.contains("win")) {
throw new SkipException("Skipping this test on Windows");
}
Path projectPath = RES_DIR.resolve(BALLERINA).resolve(
Path.of("graphql_services", "04_service_with_union_outputs.bal"));

Expand All @@ -101,6 +116,9 @@ public void testServiceWithUnionOutput() throws IOException, ExecutionException,

@Test(description = "test outputs from different files other than the service file")
public void testObjectsFromDifferentFiles() throws IOException, ExecutionException, InterruptedException {
if (OS.contains("win")) {
throw new SkipException("Skipping this test on Windows");
}
Path projectPath = RES_DIR.resolve(BALLERINA).resolve(
Path.of("graphql_services", "05_outputs_from_different_file.bal"));

Expand All @@ -113,6 +131,9 @@ public void testObjectsFromDifferentFiles() throws IOException, ExecutionExcepti

@Test(description = "test graphql file uploads")
public void testFileUploads() throws IOException, ExecutionException, InterruptedException {
if (OS.contains("win")) {
throw new SkipException("Skipping this test on Windows");
}
Path projectPath = RES_DIR.resolve(BALLERINA).resolve(
Path.of("graphql_services", "06_file_uploads.bal"));

Expand All @@ -125,6 +146,9 @@ public void testFileUploads() throws IOException, ExecutionException, Interrupte

@Test(description = "test resource paths with hierarchical paths")
public void testHierarchicalResourcePaths() throws IOException, ExecutionException, InterruptedException {
if (OS.contains("win")) {
throw new SkipException("Skipping this test on Windows");
}
Path projectPath = RES_DIR.resolve(BALLERINA).resolve(
Path.of("graphql_services", "07_hierarchical_resource_paths.bal"));

Expand All @@ -138,6 +162,9 @@ public void testHierarchicalResourcePaths() throws IOException, ExecutionExcepti

@Test(description = "test resource with invalid output")
public void testResourceWithInvalidOutput() throws IOException, ExecutionException, InterruptedException {
if (OS.contains("win")) {
throw new SkipException("Skipping this test on Windows");
}
Path projectPath = RES_DIR.resolve(BALLERINA).resolve(
Path.of("graphql_services", "08_resource_with_invalid_return.bal"));

Expand Down