Skip to content
Merged
Show file tree
Hide file tree
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 @@ -12,7 +12,7 @@ import java.util.concurrent.TimeUnit
@Deprecated
class ExecutorServiceExecutionStrategyTest extends Specification {

def 'Example usage of ExecutorServiceExecutionStrategy.'() {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

complains as a bad method name

def 'Example usage of ExecutorServiceExecutionStrategy'() {
given:
def query = """
query HeroNameAndFriendsQuery {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,12 @@ class PeopleCompaniesAndProductsDataLoaderTest extends Specification {
DataFetcher productsDF = new DataFetcher() {
@Override
Object get(DataFetchingEnvironment environment) {
return IntStream.range(0, 5)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is some groovy bugs where streams dont work on Java 11 - I am not 100% sure of the reasoning but re-writiing makes it work

.mapToObj(
{ id ->
List<Integer> madeBy = [id * 10001, id * 10002, id * 10003, id * 10004, id * 10005]
new Product(id.toString(), faker.commerce().productName(), id + 200, madeBy)
})
.collect(Collectors.toList())
List<Product> products = new ArrayList<>();
for (int id = 0; id < 5; id++) {
List<Integer> madeBy = [id * 10001, id * 10002, id * 10003, id * 10004, id * 10005]
products.add(new Product(id.toString(), faker.commerce().productName(), id + 200, madeBy))
}
return products
}
}

Expand Down