Avoid log to console directly
rj-hwang opened this issue · 3 comments
rj-hwang commented
Config a unit class with some constructor parameters like bellow code:
import org.junit.jupiter.api.Test
...
@SpringJUnitConfig(UnitTestConfiguration::class)
@DataJpaTest
class FindMethodImplTest @Autowired constructor(
@PersistenceContext val em: EntityManager,
val dao: KeyValueDao
) {
@Test
fun test() {
// something
}
}
When running each unit test method, it will log out some constructor parameters to console directory, and can not be disabled by log configuration file. The log is:
val tech.simter.kv.dao.jpa.FindMethodImplTest.dao: tech.simter.kv.dao.KeyValueDao
val tech.simter.kv.dao.jpa.FindMethodImplTest.em: javax.persistence.EntityManager
I'm using springmockk-1.1.0 with spring-5.1.5, spring-boot-2.1.3, junit-5.4.1.
jnizet commented
Thanks for the report.
There was indeed a nasty println statement in the code that I forgot to remove.
I'll release version 1.1.1 shortly.
jnizet commented
@rj-hwang I've published version 1.1.1. It should be available in Maven Central shortly, and should already be available in jcenter.
rj-hwang commented
Thanks for so quickly fixed it.