-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/apps 2894 node size details automation test #3032
Fix/apps 2894 node size details automation test #3032
Conversation
…or calculating the NodeSize.
…or calculating the NodeSize.
…or calculating the NodeSize.
…or calculating the NodeSize.
…or calculating the NodeSize.
…or calculating the NodeSize.
…or calculating the NodeSize.
jobId = restSizeDetailsModel.getJobId(); | ||
|
||
STEP("4. Wait for 3 seconds for the processing to complete."); | ||
Utility.waitToLoopTime(3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid waiting a fixed time. These test might be run on environment with different resources. Sometimes 3 seconds might be enough sometimes it might be not. It will lead to flaky tests and will require additional maintenance in the future. Try to increase the wait time but during that time check the assertions multiple times. You can do it manually in the loop or you can use org.awaitility.Awaitility
for instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acknowledged.
We have replaced the fixed time with Awaitility.await().atMost(Duration.ofSeconds()) and configured it to be used when retrieving the size details.
|
||
@BeforeClass(alwaysRun = true) | ||
public void dataPreparation() | ||
{ | ||
user1 = dataUser.createRandomTestUser("User-1"); | ||
user1 = dataUser.getAdminUser(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it mean that only admin
users can calculate the folder size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the Random Test User is also able to calculate the folder size.
We have updated it to use RandomUser instead.
…or calculating the NodeSize.
…or calculating the NodeSize.
packaging/tests/tas-restapi/src/test/java/org/alfresco/rest/nodes/NodeSizeDetailsTests.java
Fixed
Show fixed
Hide fixed
…or calculating the NodeSize.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
https://hyland.atlassian.net/browse/APPS-2894