-
Notifications
You must be signed in to change notification settings - Fork 5
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
Improving Test Reliability in RemoteTemporaryDirectory and TestJobManager #452
base: develop
Are you sure you want to change the base?
Conversation
Quality Gate passedIssues Measures |
|
||
cancelAllOngoingJobs(); | ||
|
||
Utility::msleep(10000); // Wait 10sec | ||
int rerty = 1000; // Wait max 10sec |
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.
typo
size_t total = data->size(); | ||
CPPUNIT_ASSERT(jobCounter != total); | ||
CPPUNIT_ASSERT(total > 0); | ||
size_t uploadedFileCounter = data->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.
const
_dirId = dataObj->get(idKey).toString(); | ||
const std::string& testType /*= "undef"*/) : | ||
_driveDbId(driveDbId) { | ||
std::string suffix = CommonUtility::generateRandomStringAlphaNum(5); |
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.
Not an issue but you can put this into the loop so you won't need to call it again on line 46.
Issue 1: Naming Conflicts in
RemoteTemporaryDirectory
RemoteTemporaryDirectory
can encounter aFileAlreadyExist
error due to naming conflicts in the following scenarios:Solution:
Issue 2: Flaky Test in
TestJobManager::testCancelJobs
The
TestJobManager::testCancelJobs
test could fail randomly due to:Solution:
jobManager
queue to empty.This change not only improves test reliability but also reduces test execution time, eliminating the need for an arbitrary 11-second wait.
Issue 3: Flaky Test in testLog::testExpiredLogFiles
testLog::testExpiredLogFiles could fail randomly due to timing issues caused by too short wait for log expiration.
Solution:
Increased the time interval for log expiration to ensure adequate margin for the test environment. This change ensures stability and eliminates random failures.