diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/build/OWNERS | 4 | ||||
-rw-r--r-- | test/core/OWNERS | 4 | ||||
-rw-r--r-- | test/core/security/secure_endpoint_test.c | 6 | ||||
-rw-r--r-- | test/core/surface/completion_queue_test.c | 2 | ||||
-rw-r--r-- | test/cpp/OWNERS | 4 | ||||
-rw-r--r-- | test/cpp/end2end/async_end2end_test.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/BUILD | 5 | ||||
-rw-r--r-- | test/cpp/qps/benchmark_config.cc | 4 | ||||
-rw-r--r-- | test/cpp/qps/benchmark_config.h | 3 | ||||
-rw-r--r-- | test/cpp/qps/qps_interarrival_test.cc | 3 | ||||
-rw-r--r-- | test/cpp/qps/qps_json_driver.cc | 3 | ||||
-rw-r--r-- | test/cpp/qps/qps_openloop_test.cc | 5 | ||||
-rw-r--r-- | test/cpp/qps/qps_test.cc | 64 | ||||
-rw-r--r-- | test/cpp/qps/secure_sync_unary_ping_pong_test.cc | 3 |
14 files changed, 35 insertions, 79 deletions
diff --git a/test/build/OWNERS b/test/build/OWNERS new file mode 100644 index 0000000000..8dca75ce91 --- /dev/null +++ b/test/build/OWNERS @@ -0,0 +1,4 @@ +@ctiller +@markdroth +@dgquintas + diff --git a/test/core/OWNERS b/test/core/OWNERS new file mode 100644 index 0000000000..8dca75ce91 --- /dev/null +++ b/test/core/OWNERS @@ -0,0 +1,4 @@ +@ctiller +@markdroth +@dgquintas + diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index fd8af2f152..7ecd947e1f 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -38,8 +38,10 @@ static grpc_pollset *g_pollset; static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( size_t slice_size, grpc_slice *leftover_slices, size_t leftover_nslices) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - tsi_frame_protector *fake_read_protector = tsi_create_fake_protector(NULL); - tsi_frame_protector *fake_write_protector = tsi_create_fake_protector(NULL); + tsi_frame_protector *fake_read_protector = + tsi_create_fake_frame_protector(NULL); + tsi_frame_protector *fake_write_protector = + tsi_create_fake_frame_protector(NULL); grpc_endpoint_test_fixture f; grpc_endpoint_pair tcp; diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index c27337aaa8..f9d88d6327 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -93,7 +93,7 @@ static void test_pollset_conversion(void) { attr.cq_polling_type = polling_types[j]; cq = grpc_completion_queue_create( grpc_completion_queue_factory_lookup(&attr), &attr, NULL); - GPR_ASSERT(grpc_cq_from_pollset(grpc_cq_pollset(cq)) == cq); + GPR_ASSERT(grpc_cq_pollset(cq) != NULL); shutdown_and_destroy(cq); } } diff --git a/test/cpp/OWNERS b/test/cpp/OWNERS new file mode 100644 index 0000000000..8dca75ce91 --- /dev/null +++ b/test/cpp/OWNERS @@ -0,0 +1,4 @@ +@ctiller +@markdroth +@dgquintas + diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index a2a6e36709..7b78071217 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -1752,7 +1752,9 @@ std::vector<TestScenario> CreateTestScenarios(bool test_disable_blocking, messages.push_back(big_msg); } - for (auto health_check_service : {false, true}) { + // TODO (sreek) Renable tests with health check service after the issue + // https://github.com/grpc/grpc/issues/11223 is resolved + for (auto health_check_service : {false}) { for (auto cred = credentials_types.begin(); cred != credentials_types.end(); ++cred) { for (auto msg = messages.begin(); msg != messages.end(); msg++) { diff --git a/test/cpp/qps/BUILD b/test/cpp/qps/BUILD index 4d8b3b40e3..ed2f9edac1 100644 --- a/test/cpp/qps/BUILD +++ b/test/cpp/qps/BUILD @@ -121,6 +121,7 @@ grpc_cc_binary( "//:gpr", "//test/core/util:gpr_test_util", "//test/core/util:grpc_test_util", + "//test/cpp/util:test_config", "//test/cpp/util:test_util", ], ) @@ -131,6 +132,7 @@ grpc_cc_test( deps = [ ":histogram", ":interarrival", + "//test/cpp/util:test_config", ], ) @@ -141,6 +143,7 @@ grpc_cc_binary( ":benchmark_config", ":driver_impl", "//:grpc++", + "//test/cpp/util:test_config", ], external_deps = [ "gflags", @@ -154,6 +157,7 @@ grpc_cc_test( ":benchmark_config", ":driver_impl", ":qps_worker_impl", + "//test/cpp/util:test_config", ], ) @@ -164,6 +168,7 @@ grpc_cc_test( ":benchmark_config", ":driver_impl", "//:grpc++", + "//test/cpp/util:test_config", ], ) diff --git a/test/cpp/qps/benchmark_config.cc b/test/cpp/qps/benchmark_config.cc index 8f53670324..fb1e0608c5 100644 --- a/test/cpp/qps/benchmark_config.cc +++ b/test/cpp/qps/benchmark_config.cc @@ -54,10 +54,6 @@ using namespace gflags; namespace grpc { namespace testing { -void InitBenchmark(int* argc, char*** argv, bool remove_flags) { - ParseCommandLineFlags(argc, argv, remove_flags); -} - static std::shared_ptr<Reporter> InitBenchmarkReporters() { auto* composite_reporter = new CompositeReporter; if (FLAGS_enable_log_reporter) { diff --git a/test/cpp/qps/benchmark_config.h b/test/cpp/qps/benchmark_config.h index 054dbb276e..d3d6910ff0 100644 --- a/test/cpp/qps/benchmark_config.h +++ b/test/cpp/qps/benchmark_config.h @@ -20,15 +20,12 @@ #define GRPC_TEST_CPP_UTIL_BENCHMARK_CONFIG_H #include <memory> -#include <vector> #include "test/cpp/qps/report.h" namespace grpc { namespace testing { -void InitBenchmark(int* argc, char*** argv, bool remove_flags); - /** Returns the benchmark Reporter instance. * * The returned instance will take care of generating reports for all the actual diff --git a/test/cpp/qps/qps_interarrival_test.cc b/test/cpp/qps/qps_interarrival_test.cc index d19266ff9c..87f09e8c5f 100644 --- a/test/cpp/qps/qps_interarrival_test.cc +++ b/test/cpp/qps/qps_interarrival_test.cc @@ -23,6 +23,7 @@ #include <grpc/support/histogram.h> #include "test/cpp/qps/interarrival.h" +#include "test/cpp/util/test_config.h" using grpc::testing::RandomDistInterface; using grpc::testing::InterarrivalTimer; @@ -50,6 +51,8 @@ static void RunTest(RandomDistInterface &&r, int threads, std::string title) { using grpc::testing::ExpDist; int main(int argc, char **argv) { + grpc::testing::InitTest(&argc, &argv, true); + RunTest(ExpDist(10.0), 5, std::string("Exponential(10)")); return 0; } diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index 590c22ec29..e1e5802d13 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -30,6 +30,7 @@ #include "test/cpp/qps/driver.h" #include "test/cpp/qps/parse_json.h" #include "test/cpp/qps/report.h" +#include "test/cpp/util/test_config.h" DEFINE_string(scenarios_file, "", "JSON file containing an array of Scenario objects"); @@ -219,7 +220,7 @@ static bool QpsDriver() { } // namespace grpc int main(int argc, char** argv) { - grpc::testing::InitBenchmark(&argc, &argv, true); + grpc::testing::InitTest(&argc, &argv, true); bool ok = grpc::testing::QpsDriver(); diff --git a/test/cpp/qps/qps_openloop_test.cc b/test/cpp/qps/qps_openloop_test.cc index 28dec4f8c6..b2503dabe2 100644 --- a/test/cpp/qps/qps_openloop_test.cc +++ b/test/cpp/qps/qps_openloop_test.cc @@ -20,10 +20,11 @@ #include <grpc/support/log.h> -#include "test/core/util/test_config.h" #include "test/cpp/qps/benchmark_config.h" #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" +#include "test/core/util/test_config.h" +#include "test/cpp/util/test_config.h" namespace grpc { namespace testing { @@ -58,7 +59,7 @@ static void RunQPS() { } // namespace grpc int main(int argc, char** argv) { - grpc::testing::InitBenchmark(&argc, &argv, true); + grpc::testing::InitTest(&argc, &argv, true); grpc::testing::RunQPS(); diff --git a/test/cpp/qps/qps_test.cc b/test/cpp/qps/qps_test.cc deleted file mode 100644 index 6ab2102e40..0000000000 --- a/test/cpp/qps/qps_test.cc +++ /dev/null @@ -1,64 +0,0 @@ -/* - * - * Copyright 2015 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include <set> - -#include <grpc/support/log.h> - -#include "test/cpp/qps/benchmark_config.h" -#include "test/cpp/qps/driver.h" -#include "test/cpp/qps/report.h" - -namespace grpc { -namespace testing { - -static const int WARMUP = 20; -static const int BENCHMARK = 20; - -static void RunQPS() { - gpr_log(GPR_INFO, "Running QPS test"); - - ClientConfig client_config; - client_config.set_client_type(ASYNC_CLIENT); - client_config.set_outstanding_rpcs_per_channel(100); - client_config.set_client_channels(64); - client_config.set_async_client_threads(8); - client_config.set_rpc_type(STREAMING); - client_config.mutable_load_params()->mutable_closed_loop(); - - ServerConfig server_config; - server_config.set_server_type(ASYNC_SERVER); - server_config.set_async_server_threads(8); - - const auto result = - RunScenario(client_config, 1, server_config, 1, WARMUP, BENCHMARK, -2); - - GetReporter()->ReportQPSPerCore(*result); - GetReporter()->ReportLatency(*result); -} - -} // namespace testing -} // namespace grpc - -int main(int argc, char** argv) { - grpc::testing::InitBenchmark(&argc, &argv, true); - - grpc::testing::RunQPS(); - - return 0; -} diff --git a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc index 586392692e..1ee6e37474 100644 --- a/test/cpp/qps/secure_sync_unary_ping_pong_test.cc +++ b/test/cpp/qps/secure_sync_unary_ping_pong_test.cc @@ -23,6 +23,7 @@ #include "test/cpp/qps/benchmark_config.h" #include "test/cpp/qps/driver.h" #include "test/cpp/qps/report.h" +#include "test/cpp/util/test_config.h" namespace grpc { namespace testing { @@ -61,7 +62,7 @@ static void RunSynchronousUnaryPingPong() { } // namespace grpc int main(int argc, char** argv) { - grpc::testing::InitBenchmark(&argc, &argv, true); + grpc::testing::InitTest(&argc, &argv, true); grpc::testing::RunSynchronousUnaryPingPong(); |