提交前查看Oracle会话中的所有DML更改。

3
我正在编写一个测试工具,用于测试 Oracle(10g)存储过程。我计划使用 @Transactional 测试来运行存储过程,这样当测试结束时,事务就会回滚。所以我的测试代码如下:
@ContextConfiguration(locations = "classpath:spring/ITestAssembly.xml")
@RunWith(SpringJUnit4ClassRunner.class)
public class ContentGenerationRunnerTest {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    @Test
    @Transactional
    public void contentIncShouldRun() throws Exception {
        new ContentGenerationRunner().runVclBec(jdbcTemplate);
    }
}

我可以确定正确的更新已经完成,因为测试会话中局部的更改将在测试方法中可见。但是,为了进行更严格的断言,检查在会话中调用但尚未提交的完整DML语句列表会很方便。我能不能看到这个列表?
网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接