截至昨天,我的所有测试都在运行,现在我的扩展 BaseSpringBootTest 类的测试失败了。测试应用程序类@SpringBootTest//@PropertySource(value = "classpath*:override.properties", ignoreResourceNotFound = true)//@ImportResource("classpath*:applicationContext.xml")@ComponentScan("com.myorg")public class TestApplication { public static void main(String[] args) { SpringApplication.run(TestApplication.class, args); }}BaseSpringBootTest.class@RunWith(SpringRunner.class)@SpringBootTest()@ActiveProfiles("test")public abstract class BaseSpringBootTest { @Resource protected DomainOntology domainOntology; @Before public void before() throws InterruptedException, JAXBException, IOException { domainOntology.initializeCacheIfNeeded(); ; }}测试抛出错误public class CacheFormatterTest extends BaseSpringBootTest { @Resource CacheFormatter cf; SpelEvaluator spel = new SpelEvaluator(); @Test public void testFormatWithMockedRecordGenerator() throws IOException {我期望它能够达到并运行此测试,但它似乎无法初始化。它昨天还在运行,我似乎不知道是什么让它停止了。
添加回答
举报
0/150
提交
取消