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
Register Datadog classloader as parallel capable #448
Conversation
realark
commented
Aug 17, 2018
- Register Datadog classloader as parallel capable and add a test to assert instance is not locked on during classloading
@Override | ||
public Object getClassLoadingLock(String className) { | ||
return super.getClassLoadingLock(className); | ||
} |
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.
It looks like this method already had enough visibility to not needing this. If you remove this method tests still pass.
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.
Interesting. Looks like a protected method is visible to spock tests. Pretty useful for avoiding this problem of escalating exposure for testing. Removing this method.
boolean applicationDidNotDeadlock = true | ||
|
||
then: | ||
applicationDidNotDeadlock |
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.
Failure of this test would result in test runs just hanging forever. Would it be possible to implement this so test actually exits on failure? E.g. using two additional threads and making 'main' thread just wait reasonable amount of time?
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.
👍 I added another thread and used spock's timeout annotation to fail this test after 1 minute.
a66df17
to
2d8102c
Compare
Added test timeout and removed classloading lock exposure. Please review again.