Java 将人工任务与错误修复分支关联

Java 将人工任务与错误修复分支关联,java,deployment,devops,Java,Deployment,Devops,我正在一个分支中处理一个错误修复,但是,在从我们的数据库中删除大量数据之前,该错误修复不会在生产中工作 因此,我在分支中添加了一个单元测试: /** * Before deploying this branch into production, the following data needs to be * deleted from such and such a table. * * With a detailed explanation of what needs to hap

我正在一个分支中处理一个错误修复,但是,在从我们的数据库中删除大量数据之前,该错误修复不会在生产中工作

因此,我在分支中添加了一个单元测试:

/**
 * Before deploying this branch into production, the following data needs to be
 * deleted from such and such a table. 
 * 
 * With a detailed explanation of what needs to happen and so-on.
 */
@Test
public void humanTaskTest() {
    org.junit.Assert.fail("Before deploying this branch please perform the actions described in the Javadoc comment to this test");
}

有没有更好的方法将此类提醒与特定分支相关联?

更可靠的方法是SQL变更集(Liquibase,Flyway),它在部署代码时执行db操作,但如果它需要大量时间或大量准备,则可能更容易执行“带外”操作。是的,只是我们需要删除大量过时的数据。实际上,每次添加数据时,修复程序都会执行此删除操作,但我不希望初始运行失败,因为它有太多的旧内容要删除。我宁愿手动删除它。