Hi
We use the weld test container a lot for testing our application, running in the latest wildfly release. We are extremely happy with weld for easy testing.
There is one little thing which makes my life a bit harder or I didn't found so far the solution.
I can bind a resource like this:
@WeldSetup
public WeldInitiator weld = WeldInitiator
.from(some.class)
.bindResource("DefaultManagedThreadFactory", new ManagedThreadFactory() {
@Override
public Thread newThread(Runnable r) {
return new Thread(r);
}
})
.inject(this)
.build();
Weld will inject the resource if the lookup attribute is used @Resource(lookup = "DefaultManagedThreadFactory") but this is not runnable in wildfly, here I have to use the name attribute @Resource(name= "DefaultManagedThreadFactory")
Is it possible to support also the name attribute for resource injections?
Regards,
Ralf
Hello rbattenfeld,
can you please file an issue on weld-junit GH tracker with reference to this forum post?
We can then discuss and fix that there.