Skip to content

Commit

Permalink
fix: Enhance streamer tests
Browse files Browse the repository at this point in the history
Moved streamer open calls just before execute_command_lists.
Removed zeEventQueryStatus() check from streamer tests since they have a dedicated test.
Adjusted notifyNReport and samplingPeriod values to minimize the test runtimes.
Added a new read function in harness to read specific number of reports.

Related-To: VLCLJ-2365

Signed-off-by: shubham kumar <[email protected]>
  • Loading branch information
shubskmr committed Dec 2, 2024
1 parent b3aeff2 commit 49a3574
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions conformance_tests/tools/metrics/src/test_metric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1217,9 +1217,7 @@ TEST_F(
zetMetricStreamerTest,
GivenValidMetricGroupWhenTimerBasedStreamerIsCreatedThenExpectStreamerToSucceed) {

/* The time in seconds for the buffer to overflow would be 2 * (notifyEveryNReports * (samplingPeriod/nanoSecToSeconds))
* For this test it will be 512 seconds which ensure this limit is never likely to hit even on the slowest of platform
*/
// The time in seconds for the buffer to overflow would be 2 * (notifyEveryNReports * (samplingPeriod/nanoSecToSeconds)) for this test it will be 512 seconds
uint32_t notifyEveryNReports = 256;
uint32_t samplingPeriod = 1000000000;
for (auto device : devices) {
Expand Down Expand Up @@ -1305,7 +1303,6 @@ TEST_F(

/* The time in seconds for the buffer to overflow would be 2 * (notifyEveryNReports * (samplingPeriod/nanoSecToSeconds))
* For this test it will be 9 seconds. The execution time between metric_streamer_open_for_device and synchronize observed on average is less than 50% of this
* which ensure this limit is never likely to hit even on the slowest of platform
*/
uint32_t notifyEveryNReports = 4500;
for (auto device : devices) {
Expand Down Expand Up @@ -1408,7 +1405,6 @@ TEST_F(

/* The time in seconds for the buffer to overflow would be 2 * (notifyEveryNReports * (samplingPeriod/nanoSecToSeconds))
* For this test it will be 9 seconds. The execution time between metric_streamer_open_for_device and synchronize observed on average is less than 50% of this
* which ensure this limit is never likely to hit even on the slowest of platform
*/
uint32_t notifyEveryNReports = 4500;
for (auto device : devices) {
Expand Down

0 comments on commit 49a3574

Please sign in to comment.