chore: rename random uuid to next num
This commit is contained in:
parent
32baa603f9
commit
c513cb46ea
|
@ -514,7 +514,7 @@ public class FileManagementControllerTests extends BaseTest {
|
|||
@Order(16)
|
||||
public void fileDownloadTestError() throws Exception {
|
||||
//下载不存在的文件
|
||||
mockMvc.perform(getRequestBuilder(FileManagementRequestUtils.URL_FILE_DOWNLOAD, IDGenerator.randomUUID()))
|
||||
mockMvc.perform(getRequestBuilder(FileManagementRequestUtils.URL_FILE_DOWNLOAD, IDGenerator.nextNum()))
|
||||
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
|
||||
.andExpect(status().is5xxServerError());
|
||||
}
|
||||
|
@ -1042,7 +1042,7 @@ public class FileManagementControllerTests extends BaseTest {
|
|||
checkLog(a1a1Node.getId(), OperationLogType.DELETE, FileManagementRequestUtils.URL_MODULE_DELETE);
|
||||
|
||||
//删除不存在的节点
|
||||
this.requestGetWithOk(String.format(FileManagementRequestUtils.URL_MODULE_DELETE, IDGenerator.randomUUID()));
|
||||
this.requestGetWithOk(String.format(FileManagementRequestUtils.URL_MODULE_DELETE, IDGenerator.nextNum()));
|
||||
// 测试删除根节点
|
||||
this.requestGetWithOk(String.format(FileManagementRequestUtils.URL_MODULE_DELETE, ModuleConstants.DEFAULT_NODE_ID));
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ public class IDGenerator {
|
|||
/**
|
||||
* 生成一个唯一的数字
|
||||
*/
|
||||
public static Long randomUUID() {
|
||||
public static Long nextNum() {
|
||||
return DEFAULT_UID_GENERATOR.getUID();
|
||||
}
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ public class UserControllerTests extends BaseTest {
|
|||
public void testGetByEmailError() throws Exception {
|
||||
//测试使用任意参数,不能获取到任何用户信息
|
||||
this.checkUserList();
|
||||
String url = UserRequestUtils.URL_USER_GET + IDGenerator.randomUUID();
|
||||
String url = UserRequestUtils.URL_USER_GET + IDGenerator.nextNum();
|
||||
MvcResult mvcResult = userRequestUtils.responseGet(url);
|
||||
|
||||
String returnData = mvcResult.getResponse().getContentAsString(StandardCharsets.UTF_8);
|
||||
|
|
Loading…
Reference in New Issue