diff options
author | Vijay Pai <vpai@google.com> | 2016-04-21 11:38:31 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2016-04-21 11:38:31 -0700 |
commit | dfdfe26958e8430417c6b529ad28318d327a847b (patch) | |
tree | 32632bf2f634c3053186f443b550466fb2bb7195 | |
parent | e368d8f5fda01ec5898a4dd9503acea77c8909a8 (diff) |
Make sure that there is at least one scenario, otherwise indicates malformed
input
-rw-r--r-- | test/cpp/qps/qps_json_driver.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index b2e2457bdc..a4d9b001f3 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -104,6 +104,9 @@ static void QpsDriver() { } GPR_ASSERT(scenarios.ParseFromString(binary)); + // Make sure that there is at least some valid scenario here + GPR_ASSERT(scenarios.scenarios_size() > 0); + for (int i = 0; i < scenarios.scenarios_size(); i++) { const Scenario &scenario = scenarios.scenarios(i); std::cerr << "RUNNING SCENARIO: " << scenario.name() << "\n"; |