-
-
Notifications
You must be signed in to change notification settings - Fork 924
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
embed bug fix triade and internal cleanup #2456
Conversation
oh heavens, OSGi is at me ... @mkristian could I maybe get any hints from you, please :
|
@kares this is quite something: the test-method "testJRubyCreate" first prints out two empty lines before it creates the IsolatedScriptingContainer. these lines are not there and the log goes immediately to releases the OSGi container. not sure what fails here - will have a look myself. |
@kares the problem is that all those settings: like the classlaoder, loadPAth, HomeDirectory have no effect and the test runs more a vanilla ScriptingContainer which can not load the jruby/java.rb from jruby-core.jar actually the OSGi problems is
the test fails hard with an exception which the PAX runner does not handle nicely. the exception is:
to simulate OSGi in a unit test in core/src/test/java is to use the classloader trick like: |
@mkristian seems that I will have to try running that locally ... I'm quite surprised the changes affected the OSGi container - as far as I looked into it. this one kares@969db40f034 mostly affected the singlethread provider, but there seems to be no direct relation to the container. anyways, thanks for the feedback! |
I added a testcase which simulates OSGi a bit and which fails on your branch with the same error as the OSGi test: |
… implementations : - share the logic of obtaining a global runtime - when global runtime is used make sure we always return the correct instance config! - introduce & use LocalContext's internal getRuntime for lazy runtime initialization - support contructors for all providers without the lazy argument
correctly synchronize local context setup/teardown (on our class)!
…ntime) initialization
…ngleton provider impl
…fields can go final
…alues on toString
…r instance config
03de97c
to
a5b938e
Compare
@mkristian thanks, that turned very valuable ... avoided the regression and added some more related tests |
going to re-open this one |
Whatever happened with this? The comment trail is confusing. |
sorry about that ... duplicate of #2630 |
while using JRuby's embed APIs in a slightly more advanced scenarios I run into several issues :
BiVariableMap
is not behaving as a valid Map instance (throwing NPEs on methods)ARGV
was mean to be kept (as the map is cleared) but not correctlyadded some tests covering intended (existing and fixed) functionality. trying to understand the details of context providers (and related embed variable impls) was a bit hard to read thus the did clean-up some (helped my brain to process the code).
let me know if smt needs more work, targeted jruby-1_7 - there are no (existing) API incompatibilities ...