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

Fix 2 Broken Integration Tests #164

Open
codeconsole opened this issue Nov 22, 2024 · 0 comments
Open

Fix 2 Broken Integration Tests #164

codeconsole opened this issue Nov 22, 2024 · 0 comments

Comments

@codeconsole
Copy link
Contributor

@Rollback
@Ignore
void 'Test synchronous event listener'() {
when: 'when a event listener cancels an insert'
bookService.saveBook('UK Politics')
// due to https://hibernate.atlassian.net/browse/HHH-11721
// an exception must be thrown
then: 'the insert was cancelled'
def e = thrown IllegalArgumentException
e.message == 'Books about politics not allowed'
}
}

@Ignore
void 'test async error handling'() {
when: 'we invoke an endpoint that throws an exception'
def request = HttpRequest.GET('/task/error')
client.toBlocking().exchange(request, Argument.of(String), Argument.of(String))
then: 'the response is as expected'
def e = thrown(HttpClientResponseException)
e.response.status == HttpStatus.INTERNAL_SERVER_ERROR
e.response.body() == 'error occurred'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant