I\'m new to Scala, and not that familiar with recent developments in Java, so I am having what I assume is a basic problem.
I\'m writing some Scala code, and testing
I think it's because SBT runs the tests in parallel and some initialization code in Slf4j is not thread safe (!). See http://jira.qos.ch/browse/SLF4J-167 ... it's been reported more than 2 years ago!
As a workaround I initialize Slf4j by loading the root logger before the tests run. To do so just add this to your SBT settings:
testOptions += Setup( cl =>
cl.loadClass("org.slf4j.LoggerFactory").
getMethod("getLogger",cl.loadClass("java.lang.String")).
invoke(null,"ROOT")
)