Skip to content

Commit

Permalink
Merge pull request #23111 from famod/graphql-tcks-noise
Browse files Browse the repository at this point in the history
Fix noise about missing `src/main/resources/overrides` in GraphQL TCK module
  • Loading branch information
geoand authored Jan 24, 2022
2 parents 8297512 + 9ce62cd commit 5d51dfe
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ public TestInterceptor() {
}

private void loadSchemaOverride() {
Path folderPath = Paths.get(OVERRIDES);
if (!Files.isDirectory(folderPath)) {
return;
}
// Get all csv files
try {
Path folderPath = Paths.get(OVERRIDES);
DirectoryStream<Path> overrides = Files.newDirectoryStream(folderPath);
try (DirectoryStream<Path> overrides = Files.newDirectoryStream(folderPath)) {
List<Path> overrideFiles = toListOfPathsForSchema(overrides);
List<org.eclipse.microprofile.graphql.tck.dynamic.schema.TestData> testDataList = toListOfTestDataForSchema(
overrideFiles);
Expand All @@ -78,9 +80,11 @@ private void loadSchemaOverride() {
}

private void loadExecutionOverride() {
try {
Path folderPath = Paths.get(OVERRIDES);
DirectoryStream<Path> overrides = Files.newDirectoryStream(folderPath);
Path folderPath = Paths.get(OVERRIDES);
if (!Files.isDirectory(folderPath)) {
return;
}
try (DirectoryStream<Path> overrides = Files.newDirectoryStream(folderPath)) {
Set<Path> overrideFolders = toListOfPathsForExecution(overrides);
executionTestDataMap.putAll(toMapOfTestDataForExecution(overrideFolders));
} catch (IOException ex) {
Expand Down

0 comments on commit 5d51dfe

Please sign in to comment.