Skip to content

Convert hibernate-4.0 groovy tests - part 1#9211

Merged
mateuszrzeszutek merged 4 commits into
open-telemetry:mainfrom
jaydeluca:convert-hibernate-4-0-tests-pt1
Aug 17, 2023
Merged

Convert hibernate-4.0 groovy tests - part 1#9211
mateuszrzeszutek merged 4 commits into
open-telemetry:mainfrom
jaydeluca:convert-hibernate-4-0-tests-pt1

Conversation

@jaydeluca

@jaydeluca jaydeluca commented Aug 16, 2023

Copy link
Copy Markdown
Member

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

@mateuszrzeszutek mateuszrzeszutek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @jaydeluca !

Comment thread instrumentation/hibernate/hibernate-4.0/javaagent/build.gradle.kts
…ng back in session id assertions, additional assertion around mapping exception

@mateuszrzeszutek mateuszrzeszutek left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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