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

time: Rename time_source_ and timeSource() to time_system_ and timeSystem() as appropriate #4343

Merged
merged 7 commits into from
Sep 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions include/envoy/event/dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,8 @@ class Dispatcher {

/**
* Returns a time-source to use with this dispatcher.
*
* TODO(#4160) Rename to timeSystem().
*/
virtual TimeSystem& timeSource() PURE;
virtual TimeSystem& timeSystem() PURE;

/**
* Clear any items in the deferred deletion queue.
Expand Down
5 changes: 2 additions & 3 deletions include/envoy/server/instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@ class Instance {
virtual const LocalInfo::LocalInfo& localInfo() PURE;

/**
* @return the time source used for the server.
* TODO(#4160): rename this to timeSystem().
* @return the time system used for the server.
*/
virtual Event::TimeSystem& timeSource() PURE;
virtual Event::TimeSystem& timeSystem() PURE;

/**
* @return the flush interval of stats sinks.
Expand Down
2 changes: 1 addition & 1 deletion source/common/config/grpc_mux_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ GrpcMuxImpl::GrpcMuxImpl(const LocalInfo::LocalInfo& local_info, Grpc::AsyncClie
const Protobuf::MethodDescriptor& service_method,
Runtime::RandomGenerator& random)
: local_info_(local_info), async_client_(std::move(async_client)),
service_method_(service_method), random_(random), time_source_(dispatcher.timeSource()) {
service_method_(service_method), random_(random), time_source_(dispatcher.timeSystem()) {
Copy link
Member

Choose a reason for hiding this comment

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

This one seems to still not match.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

WAI. The dispatcher keeps a TimeSystem because it works with timers. However, gRPC doesn't care about timers (yet) so it needs only a TimeSource. So when testing this, all you need is (say) a MockTimeSource, and don't need to set up a whole TimeSystem.

This is true with all the cases below as well.

Config::Utility::checkLocalInfo("ads", local_info);
retry_timer_ = dispatcher.createTimer([this]() -> void { establishNewStream(); });
backoff_strategy_ = std::make_unique<JitteredBackOffStrategy>(RETRY_INITIAL_DELAY_MS,
Expand Down
2 changes: 1 addition & 1 deletion source/common/event/dispatcher_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DispatcherImpl : Logger::Loggable<Logger::Id::main>, public Dispatcher {
event_base& base() { return *base_; }

// Event::Dispatcher
TimeSystem& timeSource() override { return time_system_; }
TimeSystem& timeSystem() override { return time_system_; }
void clearDeferredDeleteList() override;
Network::ConnectionPtr
createServerConnection(Network::ConnectionSocketPtr&& socket,
Expand Down
2 changes: 1 addition & 1 deletion source/common/grpc/google_async_client_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class GoogleAsyncClientImpl final : public AsyncClient, Logger::Loggable<Logger:
AsyncStream* start(const Protobuf::MethodDescriptor& service_method,
AsyncStreamCallbacks& callbacks) override;

TimeSource& timeSource() { return dispatcher_.timeSource(); }
TimeSource& timeSource() { return dispatcher_.timeSystem(); }
Copy link
Member

Choose a reason for hiding this comment

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

Ditto


private:
static std::shared_ptr<grpc::Channel>
Expand Down
2 changes: 1 addition & 1 deletion source/common/http/async_client_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ AsyncClientImpl::AsyncClientImpl(const Upstream::ClusterInfo& cluster, Stats::St
Router::ShadowWriterPtr&& shadow_writer)
: cluster_(cluster),
config_("http.async-client.", local_info, stats_store, cm, runtime, random,
std::move(shadow_writer), true, false, false, dispatcher.timeSource()),
std::move(shadow_writer), true, false, false, dispatcher.timeSystem()),
dispatcher_(dispatcher) {}

AsyncClientImpl::~AsyncClientImpl() {
Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/cluster_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ClusterManagerImpl::ClusterManagerImpl(const envoy::config::bootstrap::v2::Boots
init_helper_([this](Cluster& cluster) { onClusterInit(cluster); }),
config_tracker_entry_(
admin.getConfigTracker().add("clusters", [this] { return dumpClusterConfigs(); })),
time_source_(main_thread_dispatcher.timeSource()), dispatcher_(main_thread_dispatcher) {
time_source_(main_thread_dispatcher.timeSystem()), dispatcher_(main_thread_dispatcher) {
Copy link
Member

Choose a reason for hiding this comment

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

Also

async_client_manager_ = std::make_unique<Grpc::AsyncClientManagerImpl>(*this, tls, time_source_);
const auto& cm_config = bootstrap.cluster_manager();
if (cm_config.has_outlier_detection()) {
Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/health_checker_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ HealthCheckerFactory::create(const envoy::api::v2::core::HealthCheck& hc_config,
HealthCheckEventLoggerPtr event_logger;
if (!hc_config.event_log_path().empty()) {
event_logger = std::make_unique<HealthCheckEventLoggerImpl>(
log_manager, dispatcher.timeSource(), hc_config.event_log_path());
log_manager, dispatcher.timeSystem(), hc_config.event_log_path());
}
switch (hc_config.health_checker_case()) {
case envoy::api::v2::core::HealthCheck::HealthCheckerCase::kHttpHealthCheck:
Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/load_stats_reporter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LoadStatsReporter::LoadStatsReporter(const LocalInfo::LocalInfo& local_info,
async_client_(std::move(async_client)),
service_method_(*Protobuf::DescriptorPool::generated_pool()->FindMethodByName(
"envoy.service.load_stats.v2.LoadReportingService.StreamLoadStats")),
time_source_(dispatcher.timeSource()) {
time_source_(dispatcher.timeSystem()) {
Copy link
Member

Choose a reason for hiding this comment

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

.. and more :)

request_.mutable_node()->MergeFrom(local_info.node());
retry_timer_ = dispatcher.createTimer([this]() -> void { establishNewStream(); });
response_timer_ = dispatcher.createTimer([this]() -> void { sendLoadStatsRequest(); });
Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/outlier_detection_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ DetectorSharedPtr DetectorImplFactory::createForCluster(
Runtime::Loader& runtime, EventLoggerSharedPtr event_logger) {
if (cluster_config.has_outlier_detection()) {
return DetectorImpl::create(cluster, cluster_config.outlier_detection(), dispatcher, runtime,
dispatcher.timeSource(), event_logger);
dispatcher.timeSystem(), event_logger);
} else {
return nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/stat_sinks/metrics_service/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Stats::SinkPtr MetricsServiceSinkFactory::createStatsSink(const Protobuf::Messag
grpc_service, server.stats(), false),
server.threadLocal(), server.localInfo());

return std::make_unique<MetricsServiceSink>(grpc_metrics_streamer, server.timeSource());
return std::make_unique<MetricsServiceSink>(grpc_metrics_streamer, server.timeSystem());
}

ProtobufTypes::MessagePtr MetricsServiceSinkFactory::createEmptyConfigProto() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ void GrpcMetricsStreamerImpl::ThreadLocalStreamer::send(
}

MetricsServiceSink::MetricsServiceSink(const GrpcMetricsStreamerSharedPtr& grpc_metrics_streamer,
TimeSource& time_source)
: grpc_metrics_streamer_(grpc_metrics_streamer), time_source_(time_source) {}
Event::TimeSystem& time_system)
: grpc_metrics_streamer_(grpc_metrics_streamer), time_system_(time_system) {}

void MetricsServiceSink::flushCounter(const Stats::Counter& counter) {
io::prometheus::client::MetricFamily* metrics_family = message_.add_envoy_metrics();
metrics_family->set_type(io::prometheus::client::MetricType::COUNTER);
metrics_family->set_name(counter.name());
auto* metric = metrics_family->add_metric();
metric->set_timestamp_ms(std::chrono::duration_cast<std::chrono::milliseconds>(
time_source_.systemTime().time_since_epoch())
time_system_.systemTime().time_since_epoch())
.count());
auto* counter_metric = metric->mutable_counter();
counter_metric->set_value(counter.value());
Expand All @@ -83,7 +83,7 @@ void MetricsServiceSink::flushGauge(const Stats::Gauge& gauge) {
metrics_family->set_name(gauge.name());
auto* metric = metrics_family->add_metric();
metric->set_timestamp_ms(std::chrono::duration_cast<std::chrono::milliseconds>(
time_source_.systemTime().time_since_epoch())
time_system_.systemTime().time_since_epoch())
.count());
auto* gauage_metric = metric->mutable_gauge();
gauage_metric->set_value(gauge.value());
Expand All @@ -94,7 +94,7 @@ void MetricsServiceSink::flushHistogram(const Stats::ParentHistogram& histogram)
metrics_family->set_name(histogram.name());
auto* metric = metrics_family->add_metric();
metric->set_timestamp_ms(std::chrono::duration_cast<std::chrono::milliseconds>(
time_source_.systemTime().time_since_epoch())
time_system_.systemTime().time_since_epoch())
.count());
auto* summary_metric = metric->mutable_summary();
const Stats::HistogramStatistics& hist_stats = histogram.intervalStatistics();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class MetricsServiceSink : public Stats::Sink {
public:
// MetricsService::Sink
MetricsServiceSink(const GrpcMetricsStreamerSharedPtr& grpc_metrics_streamer,
TimeSource& time_source);
Event::TimeSystem& time_system);
void flush(Stats::Source& source) override;
void onHistogramComplete(const Stats::Histogram&, uint64_t) override {}

Expand All @@ -123,7 +123,7 @@ class MetricsServiceSink : public Stats::Sink {
private:
GrpcMetricsStreamerSharedPtr grpc_metrics_streamer_;
envoy::service::metrics::v2::StreamMetricsMessage message_;
TimeSource& time_source_;
Event::TimeSystem& time_system_;
};

} // namespace MetricsService
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/tracers/zipkin/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Tracing::HttpTracerPtr ZipkinTracerFactory::createHttpTracer(const Json::Object&

Tracing::DriverPtr zipkin_driver(
new Zipkin::Driver(json_config, server.clusterManager(), server.stats(), server.threadLocal(),
server.runtime(), server.localInfo(), rand, server.timeSource()));
server.runtime(), server.localInfo(), rand, server.timeSystem()));

return Tracing::HttpTracerPtr(
new Tracing::HttpTracerImpl(std::move(zipkin_driver), server.localInfo()));
Expand Down
2 changes: 1 addition & 1 deletion source/server/config_validation/cluster_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ValidationClusterManager::ValidationClusterManager(
Server::Admin& admin)
: ClusterManagerImpl(bootstrap, factory, stats, tls, runtime, random, local_info, log_manager,
main_thread_dispatcher, admin),
async_client_(main_thread_dispatcher.timeSource()) {}
async_client_(main_thread_dispatcher.timeSystem()) {}

Http::ConnectionPool::Instance*
ValidationClusterManager::httpConnPoolForCluster(const std::string&, ResourcePriority,
Expand Down
2 changes: 1 addition & 1 deletion source/server/config_validation/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class ValidationInstance : Logger::Loggable<Logger::Id::main>,
Tracing::HttpTracer& httpTracer() override { return config_->httpTracer(); }
ThreadLocal::Instance& threadLocal() override { return thread_local_; }
const LocalInfo::LocalInfo& localInfo() override { return *local_info_; }
Event::TimeSystem& timeSource() override { return time_system_; }
Event::TimeSystem& timeSystem() override { return time_system_; }

std::chrono::milliseconds statsFlushInterval() const override {
return config_->statsFlushInterval();
Expand Down
2 changes: 1 addition & 1 deletion source/server/http/admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ AdminImpl::AdminImpl(const std::string& access_log_path, const std::string& prof
stats_(Http::ConnectionManagerImpl::generateStats("http.admin.", server_.stats())),
tracing_stats_(
Http::ConnectionManagerImpl::generateTracingStats("http.admin.", no_op_store_)),
route_config_provider_(server.timeSource()),
route_config_provider_(server.timeSystem()),
handlers_{
{"/", "Admin home page", MAKE_ADMIN_HANDLER(handlerAdminHome), false, false},
{"/certs", "print certs on machine", MAKE_ADMIN_HANDLER(handlerCerts), false, false},
Expand Down
2 changes: 1 addition & 1 deletion source/server/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class InstanceImpl : Logger::Loggable<Logger::Id::main>, public Instance {
Tracing::HttpTracer& httpTracer() override;
ThreadLocal::Instance& threadLocal() override { return thread_local_; }
const LocalInfo::LocalInfo& localInfo() override { return *local_info_; }
Event::TimeSystem& timeSource() override { return time_system_; }
Event::TimeSystem& timeSystem() override { return time_system_; }

std::chrono::milliseconds statsFlushInterval() const override {
return config_->statsFlushInterval();
Expand Down
2 changes: 1 addition & 1 deletion test/common/config/filesystem_subscription_test_harness.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ typedef FilesystemSubscriptionImpl<envoy::api::v2::ClusterLoadAssignment>
class FilesystemSubscriptionTestHarness : public SubscriptionTestHarness {
public:
FilesystemSubscriptionTestHarness()
: path_(TestEnvironment::temporaryPath("eds.json")), dispatcher_(test_time_.timeSource()),
: path_(TestEnvironment::temporaryPath("eds.json")), dispatcher_(test_time_.timeSystem()),
subscription_(dispatcher_, path_, stats_) {}

~FilesystemSubscriptionTestHarness() { EXPECT_EQ(0, ::unlink(path_.c_str())); }
Expand Down
4 changes: 2 additions & 2 deletions test/common/event/dispatched_thread_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ namespace Event {
class DispatchedThreadTest : public testing::Test {
protected:
DispatchedThreadTest()
: config_(1000, 1000, 1000, 1000), guard_dog_(fakestats_, config_, test_time_.timeSource()),
thread_(test_time_.timeSource()) {}
: config_(1000, 1000, 1000, 1000), guard_dog_(fakestats_, config_, test_time_.timeSystem()),
thread_(test_time_.timeSystem()) {}

void SetUp() { thread_.start(guard_dog_); }
NiceMock<Server::Configuration::MockMain> config_;
Expand Down
4 changes: 2 additions & 2 deletions test/common/event/dispatcher_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TestDeferredDeletable : public DeferredDeletable {
TEST(DeferredDeleteTest, DeferredDelete) {
InSequence s;
DangerousDeprecatedTestTime test_time;
DispatcherImpl dispatcher(test_time.timeSource());
DispatcherImpl dispatcher(test_time.timeSystem());
ReadyWatcher watcher1;

dispatcher.deferredDelete(
Expand Down Expand Up @@ -58,7 +58,7 @@ TEST(DeferredDeleteTest, DeferredDelete) {
class DispatcherImplTest : public ::testing::Test {
protected:
DispatcherImplTest()
: dispatcher_(std::make_unique<DispatcherImpl>(test_time_.timeSource())),
: dispatcher_(std::make_unique<DispatcherImpl>(test_time_.timeSystem())),
work_finished_(false) {
dispatcher_thread_ = std::make_unique<Thread::Thread>([this]() {
// Must create a keepalive timer to keep the dispatcher from exiting.
Expand Down
4 changes: 2 additions & 2 deletions test/common/event/file_event_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Event {

class FileEventImplTest : public testing::Test {
public:
FileEventImplTest() : dispatcher_(test_time_.timeSource()) {}
FileEventImplTest() : dispatcher_(test_time_.timeSystem()) {}

void SetUp() override {
int rc = socketpair(AF_UNIX, SOCK_DGRAM, 0, fds_);
Expand Down Expand Up @@ -53,7 +53,7 @@ TEST_P(FileEventImplActivateTest, Activate) {
ASSERT_NE(-1, fd);

DangerousDeprecatedTestTime test_time;
DispatcherImpl dispatcher(test_time.timeSource());
DispatcherImpl dispatcher(test_time.timeSystem());
ReadyWatcher read_event;
EXPECT_CALL(read_event, ready()).Times(1);
ReadyWatcher write_event;
Expand Down
2 changes: 1 addition & 1 deletion test/common/filesystem/watcher_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Filesystem {

class WatcherImplTest : public testing::Test {
protected:
WatcherImplTest() : dispatcher_(test_time_.timeSource()) {}
WatcherImplTest() : dispatcher_(test_time_.timeSystem()) {}

DangerousDeprecatedTestTime test_time_;
Event::DispatcherImpl dispatcher_;
Expand Down
2 changes: 1 addition & 1 deletion test/common/grpc/async_client_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class EnvoyAsyncClientImplTest : public testing::Test {
: method_descriptor_(helloworld::Greeter::descriptor()->FindMethodByName("SayHello")) {
envoy::api::v2::core::GrpcService config;
config.mutable_envoy_grpc()->set_cluster_name("test_cluster");
grpc_client_ = std::make_unique<AsyncClientImpl>(cm_, config, test_time_.timeSource());
grpc_client_ = std::make_unique<AsyncClientImpl>(cm_, config, test_time_.timeSystem());
ON_CALL(cm_, httpAsyncClientForCluster("test_cluster")).WillByDefault(ReturnRef(http_client_));
}

Expand Down
10 changes: 5 additions & 5 deletions test/common/grpc/async_client_manager_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AsyncClientManagerImplTest : public testing::Test {
};

TEST_F(AsyncClientManagerImplTest, EnvoyGrpcOk) {
AsyncClientManagerImpl async_client_manager(cm_, tls_, test_time_.timeSource());
AsyncClientManagerImpl async_client_manager(cm_, tls_, test_time_.timeSystem());
envoy::api::v2::core::GrpcService grpc_service;
grpc_service.mutable_envoy_grpc()->set_cluster_name("foo");

Expand All @@ -39,7 +39,7 @@ TEST_F(AsyncClientManagerImplTest, EnvoyGrpcOk) {
}

TEST_F(AsyncClientManagerImplTest, EnvoyGrpcUnknown) {
AsyncClientManagerImpl async_client_manager(cm_, tls_, test_time_.timeSource());
AsyncClientManagerImpl async_client_manager(cm_, tls_, test_time_.timeSystem());
envoy::api::v2::core::GrpcService grpc_service;
grpc_service.mutable_envoy_grpc()->set_cluster_name("foo");

Expand All @@ -49,7 +49,7 @@ TEST_F(AsyncClientManagerImplTest, EnvoyGrpcUnknown) {
}

TEST_F(AsyncClientManagerImplTest, EnvoyGrpcDynamicCluster) {
AsyncClientManagerImpl async_client_manager(cm_, tls_, test_time_.timeSource());
AsyncClientManagerImpl async_client_manager(cm_, tls_, test_time_.timeSystem());
envoy::api::v2::core::GrpcService grpc_service;
grpc_service.mutable_envoy_grpc()->set_cluster_name("foo");

Expand All @@ -65,7 +65,7 @@ TEST_F(AsyncClientManagerImplTest, EnvoyGrpcDynamicCluster) {

TEST_F(AsyncClientManagerImplTest, GoogleGrpc) {
EXPECT_CALL(scope_, createScope_("grpc.foo."));
AsyncClientManagerImpl async_client_manager(cm_, tls_, test_time_.timeSource());
AsyncClientManagerImpl async_client_manager(cm_, tls_, test_time_.timeSystem());
envoy::api::v2::core::GrpcService grpc_service;
grpc_service.mutable_google_grpc()->set_stat_prefix("foo");

Expand All @@ -78,7 +78,7 @@ TEST_F(AsyncClientManagerImplTest, GoogleGrpc) {
}

TEST_F(AsyncClientManagerImplTest, EnvoyGrpcUnknownOk) {
AsyncClientManagerImpl async_client_manager(cm_, tls_, test_time_.timeSource());
AsyncClientManagerImpl async_client_manager(cm_, tls_, test_time_.timeSystem());
envoy::api::v2::core::GrpcService grpc_service;
grpc_service.mutable_envoy_grpc()->set_cluster_name("foo");

Expand Down
2 changes: 1 addition & 1 deletion test/common/grpc/google_async_client_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MockStubFactory : public GoogleStubFactory {
class EnvoyGoogleAsyncClientImplTest : public testing::Test {
public:
EnvoyGoogleAsyncClientImplTest()
: dispatcher_(test_time_.timeSource()),
: dispatcher_(test_time_.timeSystem()),
method_descriptor_(helloworld::Greeter::descriptor()->FindMethodByName("SayHello")) {
envoy::api::v2::core::GrpcService config;
auto* google_grpc = config.mutable_google_grpc();
Expand Down
4 changes: 2 additions & 2 deletions test/common/grpc/grpc_client_integration_test_harness.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class GrpcClientIntegrationTest : public GrpcClientIntegrationParamTest {
public:
GrpcClientIntegrationTest()
: method_descriptor_(helloworld::Greeter::descriptor()->FindMethodByName("SayHello")),
dispatcher_(test_time_.timeSource()) {}
dispatcher_(test_time_.timeSystem()) {}

virtual void initialize() {
if (fake_upstream_ == nullptr) {
Expand Down Expand Up @@ -276,7 +276,7 @@ class GrpcClientIntegrationTest : public GrpcClientIntegrationParamTest {
envoy::api::v2::core::GrpcService config;
config.mutable_envoy_grpc()->set_cluster_name(fake_cluster_name_);
fillServiceWideInitialMetadata(config);
return std::make_unique<AsyncClientImpl>(cm_, config, dispatcher_.timeSource());
return std::make_unique<AsyncClientImpl>(cm_, config, dispatcher_.timeSystem());
}

virtual envoy::api::v2::core::GrpcService createGoogleGrpcConfig() {
Expand Down
2 changes: 1 addition & 1 deletion test/common/http/codec_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ TEST_F(CodecClientTest, WatermarkPassthrough) {
class CodecNetworkTest : public testing::TestWithParam<Network::Address::IpVersion> {
public:
CodecNetworkTest() {
dispatcher_.reset(new Event::DispatcherImpl(test_time_.timeSource()));
dispatcher_.reset(new Event::DispatcherImpl(test_time_.timeSystem()));
upstream_listener_ = dispatcher_->createListener(socket_, listener_callbacks_, true, false);
Network::ClientConnectionPtr client_connection = dispatcher_->createClientConnection(
socket_.localAddress(), source_address_, Network::Test::createRawBufferSocket(), nullptr);
Expand Down
2 changes: 1 addition & 1 deletion test/common/http/conn_manager_impl_fuzz_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class FuzzConfig : public ConnectionManagerConfig {
};

FuzzConfig()
: route_config_provider_(test_time_.timeSource()),
: route_config_provider_(test_time_.timeSystem()),
stats_{{ALL_HTTP_CONN_MAN_STATS(POOL_COUNTER(fake_stats_), POOL_GAUGE(fake_stats_),
POOL_HISTOGRAM(fake_stats_))},
"",
Expand Down
2 changes: 1 addition & 1 deletion test/common/http/conn_manager_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class HttpConnectionManagerImplTest : public Test, public ConnectionManagerConfi
};

HttpConnectionManagerImplTest()
: route_config_provider_(test_time_.timeSource()), access_log_path_("dummy_path"),
: route_config_provider_(test_time_.timeSystem()), access_log_path_("dummy_path"),
access_logs_{
AccessLog::InstanceSharedPtr{new Extensions::AccessLoggers::File::FileAccessLog(
access_log_path_, {}, AccessLog::AccessLogFormatUtils::defaultAccessLogFormatter(),
Expand Down
Loading