Ashwani Raina has posted comments on this change. ( http://gerrit.cloudera.org:8080/23707 )
Change subject: KUDU-1457 [8/n] Parameterize tests with ip config ...................................................................... Patch Set 4: (8 comments) http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/server/webserver-test.cc File src/kudu/server/webserver-test.cc: http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/server/webserver-test.cc@108 PS4, Line 108: mode_ = GetParam(); > Is it possible to make 'mode_' a constant member field and move its initial Done http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/server/webserver-test.cc@962 PS4, Line 962: i.e., IPv4 wildcard > nit: remove this part since the value of FLAGS_webserver_interface might be Done http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/server/webserver-test.cc@977 PS4, Line 977: IPMode mode_; > nit: make this a constant member field and initialize it in the constructor I made this class a parametrized just like WebserverTest() along with initialization of mode_ with ctor's initializer list and ip_config_mode flag inside the constructor. http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/server/webserver-test.cc@1126 PS4, Line 1126: switch (GetParam()) { : case IPMode::IPV6: : opts.bind_interface = "[::1]"; : break; : case IPMode::DUAL: : opts.bind_interface = "[::]"; : break; : default: : // Default value of FLAGS_webserver_interface i.e., IPv4 wildcard. : break; : } > Please consolidate this with the same code in the WebserverTest::use_webser Done http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/util/net/net_util.h File src/kudu/util/net/net_util.h: http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/util/net/net_util.h@285 PS4, Line 285: ip_config_mode > nit: wouldn't it be more consistent and easier for reader's comprehension t Are you pointing to just changing the comment to add reference to ParseIPModeFlag instead of writing ip_config_mode? Or something else? http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/util/net/net_util.h@288 PS4, Line 288: GetIPConfigMode > The name of this function is misleading and doesn't follow the code style g Done http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/util/net/net_util.cc File src/kudu/util/net/net_util.cc: http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/util/net/net_util.cc@186 PS4, Line 186: string > nit: to avoid needless string copying, either change this to return 'const Done http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/util/test_util.cc File src/kudu/util/test_util.cc: http://gerrit.cloudera.org:8080/#/c/23707/4/src/kudu/util/test_util.cc@762 PS4, Line 762: void PrintTo(IPMode param, std::ostream* os) { : *os << GetIPConfigMode(param); : } > nit: in C++, there is more elegant ways of doing this. Consider making it My intention is to restrict this the usage to gtest failure messages and not spread elsewhere. I tried similar way in one of the previous patchsets: https://gerrit.cloudera.org/c/23707/2/src/kudu/server/webserver-test.cc#85 Didn't look clean. -- To view, visit http://gerrit.cloudera.org:8080/23707 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic72efea2045b12300ccf0e80873c405828c15a30 Gerrit-Change-Number: 23707 Gerrit-PatchSet: 4 Gerrit-Owner: Ashwani Raina <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Ashwani Raina <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Comment-Date: Mon, 02 Feb 2026 13:05:22 +0000 Gerrit-HasComments: Yes
