Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit ddb869d

Browse files
authored
Use StubInterface instead of Stub, for mocks. (#366)
e.g. MockMetricServiceStub and MetricService::Stub both inherit from MetricService::StubInterface. This change doesn't break the API.
1 parent be93d3a commit ddb869d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

opencensus/exporters/stats/stackdriver/stackdriver_exporter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct StackdriverOptions {
7777
// Optional: by default, the exporter connects to Stackdriver using gRPC. If
7878
// this stub is non-null, the exporter will use this stub to send gRPC calls
7979
// instead. Useful for testing.
80-
std::unique_ptr<google::monitoring::v3::MetricService::Stub>
80+
std::unique_ptr<google::monitoring::v3::MetricService::StubInterface>
8181
metric_service_stub;
8282
};
8383

opencensus/exporters/trace/stackdriver/stackdriver_exporter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct StackdriverOptions {
3737
// (optional) By default, the exporter connects to Stackdriver using gRPC. If
3838
// this stub is non-null, the exporter will use this stub to send gRPC calls
3939
// instead. Useful for testing.
40-
std::unique_ptr<google::devtools::cloudtrace::v2::TraceService::Stub>
40+
std::unique_ptr<google::devtools::cloudtrace::v2::TraceService::StubInterface>
4141
trace_service_stub;
4242
};
4343

0 commit comments

Comments
 (0)