Skip to content
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

enabled unit test MetricFlowTest.GrpcPredict #3057

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

dtrawins
Copy link
Collaborator

@dtrawins dtrawins commented Feb 11, 2025

🛠 Summary

CVS-161484
Avoid sporadic unit tests failures on windows

🧪 Checklist

  • Unit tests added.
  • The documentation updated.
  • Change follows security best practices.
    ``

@dtrawins dtrawins marked this pull request as ready for review February 12, 2025 09:13
@dtrawins dtrawins changed the title test enabled unit test MetricFlowTest.GrpcPredict Feb 12, 2025
@@ -197,7 +197,7 @@ class MetricFlowTest : public TestWithTempDir {

void SetUp() override {
TestWithTempDir::SetUp();
char* n_argv[] = {(char*)"ovms", (char*)"--config_path", (char*)"/unused", (char*)"--rest_port", (char*)"8080"}; // Workaround to have rest_port parsed in order to enable metrics
char* n_argv[] = {(char*)"ovms", (char*)"--config_path", (char*)"/unused", (char*)"--rest_port", (char*)"8080", (char*)"--grpc_max_threads", (char*)"4"}; // Workaround to have rest_port parsed in order to enable metrics
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update arg_count

@@ -274,7 +271,7 @@ TEST_F(MetricFlowTest, GrpcPredict) {
EXPECT_THAT(server.collect(), HasSubstr(METRIC_NAME_STREAMS + std::string{"{name=\""} + modelName + std::string{"\",version=\"1\"} "} + std::to_string(4)));
EXPECT_THAT(server.collect(), Not(HasSubstr(METRIC_NAME_STREAMS + std::string{"{name=\""} + dagName + std::string{"\",version=\"1\"} "})));

EXPECT_THAT(server.collect(), HasSubstr(METRIC_NAME_INFER_REQ_QUEUE_SIZE + std::string{"{name=\""} + modelName + std::string{"\",version=\"1\"} "} + std::to_string(2)));
EXPECT_THAT(server.collect(), HasSubstr(METRIC_NAME_INFER_REQ_QUEUE_SIZE + std::string{"{name=\""} + modelName + std::string{"\",version=\"1\"} "} + std::to_string(6)));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change (2->6)? This test worked fine on Linux and we need change the value on Windows?

@@ -197,7 +197,7 @@ class MetricFlowTest : public TestWithTempDir {

void SetUp() override {
TestWithTempDir::SetUp();
char* n_argv[] = {(char*)"ovms", (char*)"--config_path", (char*)"/unused", (char*)"--rest_port", (char*)"8080"}; // Workaround to have rest_port parsed in order to enable metrics
char* n_argv[] = {(char*)"ovms", (char*)"--config_path", (char*)"/unused", (char*)"--rest_port", (char*)"8080", (char*)"--grpc_max_threads", (char*)"4"}; // Workaround to have rest_port parsed in order to enable metrics
Copy link
Collaborator

@dkalinowski dkalinowski Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding new arguments but arg_count remains unchanged, i dont think this param is effective in this unit test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants