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

Convert hibernate-4.0 groovy tests - part 1 #9211

Merged

Conversation

jaydeluca
Copy link
Member

@jaydeluca jaydeluca commented Aug 16, 2023

Related to #7195

Theres a lot of code in the hibernate 4-0 test suite, so I am breaking up #9191 into smaller pieces. This is the first piece.

  • Moves Value and updates references to the new location
  • Converted SessionTest. In the groovy version of SessionTest.test hibernate action they combined code for StatelessSession and Session, but I ended up splitting these out into separate tests (testHibernateAction, testHibernateActionStateless).

Thanks for taking the time to review.

@jaydeluca jaydeluca requested a review from a team August 16, 2023 00:37
Copy link
Member

@mateuszrzeszutek mateuszrzeszutek left a comment

Choose a reason for hiding this comment

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

Thanks @jaydeluca !

…ng back in session id assertions, additional assertion around mapping exception
Copy link
Member

@mateuszrzeszutek mateuszrzeszutek left a comment

Choose a reason for hiding this comment

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

Thanks!

Comment on lines 430 to 440
.hasEventsSatisfyingExactly(
event ->
event
.hasName(EXCEPTION_EVENT_NAME)
.hasAttributesSatisfyingExactly(
equalTo(
EXCEPTION_TYPE, mappingException.getClass().getName()),
equalTo(EXCEPTION_MESSAGE, mappingException.getMessage()),
satisfies(
EXCEPTION_STACKTRACE,
val -> val.isInstanceOf(String.class)))),
Copy link
Member

Choose a reason for hiding this comment

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

Nit: could be just

Suggested change
.hasEventsSatisfyingExactly(
event ->
event
.hasName(EXCEPTION_EVENT_NAME)
.hasAttributesSatisfyingExactly(
equalTo(
EXCEPTION_TYPE, mappingException.getClass().getName()),
equalTo(EXCEPTION_MESSAGE, mappingException.getMessage()),
satisfies(
EXCEPTION_STACKTRACE,
val -> val.isInstanceOf(String.class)))),
.hasException(mappingException),

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

Successfully merging this pull request may close these issues.

2 participants