-
Notifications
You must be signed in to change notification settings - Fork 4
RDKEMW-10671 : Intermittent failure on Testframework while running entservices-softwareupdate workflows. #183
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
base: develop
Are you sure you want to change the base?
Changes from all commits
6791519
1bdf523
0be910e
f8879c1
2bcf266
e3edcf5
5d132ec
07a8abe
f4055f7
0eebe13
be6f202
6ecaba7
9ad1c4f
cbcbea5
5f3705f
602b13b
0e96778
9e84a5b
49816a6
ef620b4
0ab5043
3e2e761
a25fad1
d2e053a
f3ab9f0
bc6bd6d
42445b6
dd99d80
8d950bb
af0885d
109bc11
c0691a9
040a9f7
fef3471
1cd62a5
f718e57
e4ec051
dc6cd16
a26c49f
79adedb
764fc22
5f5b920
2763b66
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -118,22 +118,25 @@ TEST_F(MaintenanceManagerTest, getMaintenanceStartTime_json_rpc) | |
| MaintenanceManagerConfFile << "start_min=\"30\"\n"; | ||
| MaintenanceManagerConfFile << "tz_mode=\"UTC\"\n"; | ||
| MaintenanceManagerConfFile.close(); | ||
| std::ifstream MaintenanceManagerConfFile("/opt/rdk_maintenance.conf"); | ||
| if (!MaintenanceManagerConfFile) { | ||
| std::cerr << "Failed to open /opt/rdk_maintenance.conf for reading." << std::endl; | ||
| } | ||
|
|
||
| } | ||
|
|
||
| std::ifstream verifyFile("/opt/rdk_maintenance.conf"); | ||
| if (!verifyFile) { | ||
| std::cerr << "Failed to open /opt/rdk_maintenance.conf for reading." << std::endl; | ||
| } else { | ||
| std::string line; | ||
| while (std::getline(MaintenanceManagerConfFile, line)) { | ||
| while (std::getline(verifyFile, line)) { | ||
| std::cout << line << std::endl; | ||
| } | ||
| verifyFile.close(); | ||
| } | ||
|
Comment on lines
+123
to
+132
|
||
|
|
||
| status = InvokeServiceMethod("org.rdk.MaintenanceManager", "getMaintenanceStartTime", params1, results1); | ||
| ASSERT_EQ(results1["success"].Boolean(), true); | ||
| ASSERT_EQ(status, Core::ERROR_NONE); | ||
| } | ||
|
|
||
|
|
||
| } | ||
|
|
||
| //getMaintenanceActivityStatus jsonRPC | ||
| TEST_F(MaintenanceManagerTest,getMaintenanceActivityStatus) | ||
| { | ||
|
|
@@ -163,9 +166,30 @@ TEST_F(MaintenanceManagerTest,stopMaintenance) | |
| { | ||
| uint32_t status = Core::ERROR_GENERAL; | ||
| JsonObject params1, results1; | ||
| bool maintenanceStarted = false; | ||
|
|
||
| // Wait for maintenance to actually start (with timeout) | ||
| int retries = 10; // 10 seconds max | ||
| while (retries-- > 0) { | ||
| status = InvokeServiceMethod("org.rdk.MaintenanceManager","getMaintenanceActivityStatus",params1, results1); | ||
| if ((status == Core::ERROR_NONE) && | ||
| results1.HasLabel("maintenanceStatus") && | ||
| results1["maintenanceStatus"].String() == "MAINTENANCE_STARTED") { | ||
| maintenanceStarted = true; | ||
| break; | ||
| } | ||
| sleep(1); | ||
| } | ||
|
|
||
| // Verify maintenance is running | ||
| ASSERT_TRUE(maintenanceStarted) | ||
| << "Maintenance did not start within timeout. Last status: " | ||
| << results1["maintenanceStatus"].String(); | ||
|
|
||
| // Now stop the active maintenance | ||
| status = InvokeServiceMethod("org.rdk.MaintenanceManager","stopMaintenance",params1, results1); | ||
| ASSERT_EQ(results1["success"].Boolean(), true); | ||
| ASSERT_EQ(status, Core::ERROR_NONE); | ||
| ASSERT_EQ(results1["success"].Boolean(), true); | ||
| } | ||
|
|
||
| //startMaintenance jsonPRC Test on an active Maintenance Cycle | ||
|
|
||
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.
The workflow is being changed to use a test branch 'Test_Workflow' instead of 'develop'. This appears to be a temporary change for testing purposes and should likely not be merged to the main branch. Using a test branch reference in the workflow configuration could cause CI/CD failures once the test branch is removed or if the branch doesn't exist in production environments.