-
Notifications
You must be signed in to change notification settings - Fork 881
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
Convert hibernate-4.0 groovy tests - part 1 #9211
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jaydeluca !
...st/java/io/opentelemetry/javaagent/instrumentation/hibernate/v4_0/AbstractHibernateTest.java
Outdated
Show resolved
Hide resolved
...st/java/io/opentelemetry/javaagent/instrumentation/hibernate/v4_0/AbstractHibernateTest.java
Outdated
Show resolved
Hide resolved
...ent/src/test/java/io/opentelemetry/javaagent/instrumentation/hibernate/v4_0/SessionTest.java
Outdated
Show resolved
Hide resolved
...ent/src/test/java/io/opentelemetry/javaagent/instrumentation/hibernate/v4_0/SessionTest.java
Outdated
Show resolved
Hide resolved
...ent/src/test/java/io/opentelemetry/javaagent/instrumentation/hibernate/v4_0/SessionTest.java
Outdated
Show resolved
Hide resolved
...ent/src/test/java/io/opentelemetry/javaagent/instrumentation/hibernate/v4_0/SessionTest.java
Show resolved
Hide resolved
…ng back in session id assertions, additional assertion around mapping exception
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
.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)))), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: could be just
.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), |
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.
Value
and updates references to the new locationSessionTest.test hibernate action
they combined code forStatelessSession
andSession
, but I ended up splitting these out into separate tests (testHibernateAction, testHibernateActionStateless).Thanks for taking the time to review.