You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use karate mock with a custom library that I created. If I run karate mock without the watch feature it works without any issues. When I enable it, it can sometimes happen that the ContextClassLoader in Suite.java is null. It does not always happen, but only when I start the changing the feature file. And even then it does not happen on every refresh but only on some.
You can try to reproduce it by creating a MockServer in a Java project and set watch to true. Then add a debug point with a null check in Suite when the classloader is set. Now keep changing something in the feature file and keep making calls to the mock server.
Could we add a check if the ContextClassLoader is null and then call the getClass().getClassLoader()if it's null?
Thanks!
The text was updated successfully, but these errors were encountered:
I want to use karate mock with a custom library that I created. If I run karate mock without the watch feature it works without any issues. When I enable it, it can sometimes happen that the
ContextClassLoader
inSuite.java
is null. It does not always happen, but only when I start the changing the feature file. And even then it does not happen on every refresh but only on some.karate/karate-core/src/main/java/com/intuit/karate/Suite.java
Line 142 in fed432f
You can try to reproduce it by creating a MockServer in a Java project and set watch to true. Then add a debug point with a null check in Suite when the classloader is set. Now keep changing something in the feature file and keep making calls to the mock server.
Could we add a check if the ContextClassLoader is null and then call the
getClass().getClassLoader()
if it's null?Thanks!
The text was updated successfully, but these errors were encountered: