Refactor end2end tests to exercise each EventEngine (#29202)
* Refactor end2end tests to exercise each EventEngine * fix incorrect bazel_only exclusions * Automated change: Fix sanity tests * microbenchmark fix * sanitize, fix iOS flub * Automated change: Fix sanity tests * iOS fix * reviewer feedback * first pass at excluding EventEngine test expansion Also caught a few cases where we should not test pollers, but should test all engines. And two cases where we likely shouldn't be testing either product. * end2end fuzzers to be fuzzed differently via EventEngine. * sanitize * reviewer feedback * remove misleading comment * reviewer feedback: comments * EE test_init needs to play with our build system * fix golden file test runner Co-authored-by: drfloob <drfloob@users.noreply.github.com>pull/29267/head
parent
114e83d875
commit
18a8f6aad9
383 changed files with 837 additions and 542 deletions
@ -1,22 +0,0 @@ |
|||||||
#!/bin/sh |
|
||||||
|
|
||||||
# Test runner for end2end tests from bazel |
|
||||||
|
|
||||||
# Copyright 2017 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. |
|
||||||
if [ -n "$3" ] |
|
||||||
then |
|
||||||
export GRPC_POLL_STRATEGY=$3 |
|
||||||
fi |
|
||||||
"$1" "$2" |
|
@ -0,0 +1,39 @@ |
|||||||
|
// Copyright 2022 The 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 <grpc/support/port_platform.h> |
||||||
|
|
||||||
|
#include "test/core/event_engine/test_init.h" |
||||||
|
|
||||||
|
#include "absl/strings/str_cat.h" |
||||||
|
|
||||||
|
#include <grpc/support/log.h> |
||||||
|
|
||||||
|
namespace grpc_event_engine { |
||||||
|
namespace experimental { |
||||||
|
|
||||||
|
/// Sets the default EventEngine factory, used for testing.
|
||||||
|
/// Valid engines are:
|
||||||
|
/// * 'default' or 'libuv': the LibuvEventEngine
|
||||||
|
absl::Status InitializeTestingEventEngineFactory(absl::string_view engine) { |
||||||
|
if (engine == "default" || engine == "libuv") { |
||||||
|
// TODO(hork): SetDefaultEventEngineFactory(LibuvEventEngineFactory)
|
||||||
|
gpr_log(GPR_DEBUG, "Libuv EventEngine initialized."); |
||||||
|
return absl::OkStatus(); |
||||||
|
} |
||||||
|
return absl::InvalidArgumentError( |
||||||
|
absl::StrCat("Unknown EventEngine implementation: ", engine)); |
||||||
|
} |
||||||
|
|
||||||
|
} // namespace experimental
|
||||||
|
} // namespace grpc_event_engine
|
@ -0,0 +1,29 @@ |
|||||||
|
// Copyright 2022 The 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 <grpc/support/port_platform.h> |
||||||
|
|
||||||
|
#ifndef GRPC_TEST_CORE_EVENT_ENGINE_TEST_INIT_H |
||||||
|
#define GRPC_TEST_CORE_EVENT_ENGINE_TEST_INIT_H |
||||||
|
|
||||||
|
#include <grpc/event_engine/event_engine.h> |
||||||
|
|
||||||
|
namespace grpc_event_engine { |
||||||
|
namespace experimental { |
||||||
|
|
||||||
|
absl::Status InitializeTestingEventEngineFactory(absl::string_view engine); |
||||||
|
|
||||||
|
} // namespace experimental
|
||||||
|
} // namespace grpc_event_engine
|
||||||
|
|
||||||
|
#endif // GRPC_TEST_CORE_EVENT_ENGINE_TEST_INIT_H
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue