Skip to content

Commit 9fda6d0

Browse files
Fix tests
Signed-off-by:Phillip Kruger <phillip.kruger@gmail.com>
1 parent bcd788f commit 9fda6d0

6 files changed

Lines changed: 10 additions & 13 deletions

File tree

server/tck/src/test/java/io/smallrye/graphql/test/apps/exceptionlist/ExceptionListApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ public class ExceptionListApi {
88

99
@Query
1010
public String checkedException() throws MyCheckedException {
11-
throw new MyCheckedException("This error will not show");
11+
throw new MyCheckedException("This error should not show");
1212
}
1313

1414
@Query
1515
public String uncheckedException() throws MyUncheckedException {
16-
throw new MyUncheckedException("This error will show");
16+
throw new MyUncheckedException("This error should show");
1717
}
1818

1919
}

server/tck/src/test/java/io/smallrye/graphql/test/apps/exceptionlist/MyUncheckedException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package io.smallrye.graphql.test.apps.exceptionlist;
22

3-
public class MyUncheckedException extends Exception {
3+
public class MyUncheckedException extends RuntimeException {
44

55
public MyUncheckedException(String errMsg) {
66
super(errMsg);

server/tck/src/test/resources/tests/exceptionlist/checkedexception/input.graphQL renamed to server/tck/src/test/resources/tests/exceptionlist/checkedexception/input.graphql

File renamed without changes.

server/tck/src/test/resources/tests/exceptionlist/checkedexception/output.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
{
22
"errors": [
33
{
4-
"message": "This error will not show",
4+
"message": "Unexpected failure in the system. Jarvis is working to fix it.",
55
"locations": [
66
{
77
"line": 2,
8-
"column": 3
8+
"column": 5
99
}
1010
],
1111
"path": [
1212
"checkedException"
13-
],
14-
"extensions": {
15-
"classification": "DataFetchingException"
16-
}
13+
]
1714
}
1815
],
1916
"data": {

server/tck/src/test/resources/tests/exceptionlist/uncheckedexception/input.graphQL renamed to server/tck/src/test/resources/tests/exceptionlist/uncheckedexception/input.graphql

File renamed without changes.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
22
"errors": [
33
{
4-
"message": "This error will not show",
4+
"message": "This error should show",
55
"locations": [
66
{
77
"line": 2,
8-
"column": 3
8+
"column": 5
99
}
1010
],
1111
"path": [
12-
"checkedException"
12+
"uncheckedException"
1313
],
1414
"extensions": {
1515
"classification": "DataFetchingException"
1616
}
1717
}
1818
],
1919
"data": {
20-
"checkedException": null
20+
"uncheckedException": null
2121
}
2222
}

0 commit comments

Comments
 (0)