REM:
1. 处置设备数据库测试增加回滚功能,避免设备ID不停变化
This commit is contained in:
HuangXin 2020-05-09 16:36:14 +08:00
parent 4cb3cfcc6d
commit 02a8ff7a45
1 changed files with 4 additions and 0 deletions

View File

@ -13,7 +13,9 @@ import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters; import org.junit.runners.MethodSorters;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
@ -26,6 +28,8 @@ import java.util.List;
@SpringBootTest @SpringBootTest
@Slf4j @Slf4j
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Transactional
@Rollback
public class DisposeDeviceMapperTest extends InitTestEnvironment { public class DisposeDeviceMapperTest extends InitTestEnvironment {
/** /**
* The Object mapper. * The Object mapper.