quick-perf / quickperf

QuickPerf is a testing library for Java to quickly evaluate and improve some performance-related properties
https://github.com/quick-perf/doc/wiki/QuickPerf
Apache License 2.0
469 stars 67 forks source link

QuickPerfSpringRunner did not call the Spring TestExecutionListener instances before the test method execution #134

Closed jeanbisutti closed 3 years ago

jeanbisutti commented 3 years ago

Bug example


@RunWith(QuickPerfSpringRunner.class)
@Import(QuickPerfSqlConfig.class)
@DataJpaTest()
public class QuickPerfSpringRunnerBeforeTest {

    @Autowired
    private TestEntityManager testEntityManager;

    @Before
    public void before() {
        Player player = new Player();
        testEntityManager.persist(player);
    }

    @Test
    public void test() {
    }

}

Exception: java.lang.IllegalStateException: No transactional EntityManager found