1818static const std::string FT_MODEL_PATH = CLASSIFIER_CONFIGS_DIR " floret_model_supervised.bin" ;
1919
2020
21- /*
22- * Description: Verifies that the URM classifier model file is properly loaded and accessible
23- * at system startup.
24- */
25- URM_TEST (TestModelLoads, {
26- const std::string modelPath = FT_MODEL_PATH;
27-
28- // Wait for URM service to complete initialization and settle
29- // This ensures all service components, including the classifier subsystem,
30- // are fully initialized before we attempt to access the model file
31- std::this_thread::sleep_for (std::chrono::milliseconds (1800 ));
32-
33- // Verify model file exists and is accessible
34- // fileExists() returns file size if successful, -1 if file not found or inaccessible
35- int64_t modelExists = AuxRoutines::fileExists (modelPath);
36-
37- // Log the result for debugging
38- if (modelExists > 0 ) {
39- std::cout << LOG_BASE << " Model file found at: " << modelPath << std::endl;
40- std::cout << LOG_BASE << " Model file size: " << modelExists << " bytes" << std::endl;
41- } else {
42- std::cout << LOG_BASE << " ERROR: Model file not found or inaccessible" << std::endl;
43- std::cout << LOG_BASE << " Expected path: " << modelPath << std::endl;
44- std::cout << LOG_BASE << " Verify model deployment and file permissions" << std::endl;
45- }
46-
47- // Assert that model file exists and is accessible (size > 0)
48- E_ASSERT ((modelExists > 0 ));
49- })
50-
5121/* *
5222 * API under test: Tune / Untune
53- * - Spawns GStreamer and verifies that the per-app config
54- * correctly tunes the resource node when GStreamer is running
23+ * - Spawns GStreamer and verifies that correctly
24+ * - tunes the resource node when GStreamer is running
5525 * - Verifies resource value is set when GStreamer is active
5626 * - Verifies resource value resets once the request expires
5727 */
@@ -61,14 +31,6 @@ URM_TEST(TestGstreamerPerAppConfigValidated, {
6131 // Wait for service to settle
6232 std::this_thread::sleep_for (std::chrono::milliseconds (1800 ));
6333
64- // Verify model file exists
65- int64_t modelExists = AuxRoutines::fileExists (modelPath);
66- if (modelExists <= 0 ) {
67- std::cout << LOG_BASE << " Model not found, skipping test" << std::endl;
68- E_ASSERT (false );
69- return ;
70- }
71-
7234 std::string testResourceName = " /etc/urm/tests/nodes/target_test_resource1.txt" ;
7335 int32_t testResourceOriginalValue = 240 ;
7436
@@ -141,8 +103,8 @@ URM_TEST(TestGstreamerPerAppConfigValidated, {
141103
142104/* *
143105 * API under test: Tune / Untune
144- * - Spawns vi text editor and verifies that the per-app config
145- * correctly tunes the resource node when vi is running
106+ * - Spawns vi text editor and verifies that correctly
107+ * - tunes the resource node when vi is running
146108 * - Verifies resource value is set when vi is active
147109 * - Verifies resource value resets once the request expires
148110 */
@@ -152,14 +114,6 @@ URM_TEST(TestViPerAppConfigValidated, {
152114 // Wait for service to settle
153115 std::this_thread::sleep_for (std::chrono::milliseconds (1800 ));
154116
155- // Verify model file exists
156- int64_t modelExists = AuxRoutines::fileExists (modelPath);
157- if (modelExists <= 0 ) {
158- std::cout << LOG_BASE << " Model not found, skipping test" << std::endl;
159- E_ASSERT (false );
160- return ;
161- }
162-
163117 std::string testResourceName = " /etc/urm/tests/nodes/target_test_resource1.txt" ;
164118 int32_t testResourceOriginalValue = 240 ;
165119
0 commit comments