junit: impact of forkMode=“once” on test correctness

前端 未结 3 812
粉色の甜心
粉色の甜心 2021-01-01 12:38

I\'d like to reduce the time which our build (using ant) takes for running the tests. Currently I am using the default forkMode, which forks a new vm on each test cl

3条回答
  •  孤独总比滥情好
    2021-01-01 13:12

    Looking at Stefan's blog entry about this I would venture to guess:

    1. you will only get a single class loader for forkMode="once"
    2. you won't have access to the Ant environment anymore
    3. the GC will be performed inside the spawned GC (if forceMode="once") and this means it's NOT after each test is run.

提交回复
热议问题