<@U4Z1U6LJK> Can you see where? I don't see any co...
# tornadofx
e
@kastork Can you see where? I don't see any code that should add interceptors there.
k
@edvin Yes, in the initialization of App.kt
Copy code
init {
        Stylesheet.importServiceLoadedStylesheets()
        stylesheet.forEach { importStylesheet(it) }
        importChildInterceptors()
    }

    private fun importChildInterceptors() {
        ServiceLoader.load(ChildInterceptor::class.java).forEach {
            FX.addChildInterceptor(it)
        }
    }
e
No, that would only load the interceptors that are registered as a service, ie. are available in meta-inf/services.
k
yes, I think that's exactly what is happening
those get loaded and then the ones in the test get loaded which adds up to 4, not 2
Well in any event, the tests in
ChildInterceptorTest.kt
pass if you
@Ignore class StylesheetErrorTest : ApplicationTest()
@edvin Try renaming
ChildInterceptorTest
to
ZChildInterceptorTest
. If you do that, the error presents even when running tests with IDEA instead of Maven. It changes the order of the tests so that
StylesheetErrorTest
happens first (like it does if you run the Maven test goal).