This is an automated email from the ASF dual-hosted git repository.
cdmikechen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/submarine.git
The following commit(s) were added to refs/heads/master by this push:
new 604ad540 SUBMARINE-1368. Fix SysUserRestApiTest editUserTest test error
604ad540 is described below
commit 604ad540e6167b06fb850c90274434eca1ee02cb
Author: cdmikechen <[email protected]>
AuthorDate: Sun Feb 26 11:36:56 2023 +0800
SUBMARINE-1368. Fix SysUserRestApiTest editUserTest test error
### What is this PR for?
There is an exception in the method of obtaining users in
SysUserRestApiTest class. If the size of users is greater than 1, the actual
test users may not be obtained.
We need to add a filter condition.
### What type of PR is it?
Bug Fix
### Todos
* [x] - Fixed user get list error
### What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-1368
### How should this be tested?
This test case can be used to verify this problem
### Screenshots (if appropriate)
NA
### Questions:
* Do the license files need updating? No
* Are there breaking changes for older versions? No
* Does this need new documentation? No
Author: cdmikechen <[email protected]>
Signed-off-by: cdmikechen <[email protected]>
Closes #1050 from cdmikechen/SUBMARINE-1368 and squashes the following
commits:
53d4ab56 [cdmikechen] Add filter
---
.../apache/submarine/server/rest/workbench/SysUserRestApiTest.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/workbench/SysUserRestApiTest.java
b/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/workbench/SysUserRestApiTest.java
index 7aa31db5..d148d778 100644
---
a/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/workbench/SysUserRestApiTest.java
+++
b/submarine-server/server-core/src/test/java/org/apache/submarine/server/rest/workbench/SysUserRestApiTest.java
@@ -68,9 +68,13 @@ public class SysUserRestApiTest extends CommonDataTest {
CommonDataTest.assertUserResponseSuccess(response);
List<SysUserEntity> userList = userService.queryPageList("", null, null,
null, null, 0, 10);
+ LOG.info("Get Users {}", userList);
assertTrue(userList.size() > 0);
+ SysUserEntity checkUser = userList.stream()
+ .filter(user -> user.getId().equals(CommonDataTest.userId))
+ .findFirst()
+ .orElse(null);
- SysUserEntity checkUser = userList.get(0);
assertEquals(sysUser.getUserName(), checkUser.getUserName());
assertEquals(sysUser.getRealName(), checkUser.getRealName());
assertEquals(sysUser.getStatus(), checkUser.getStatus());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]