Skip to content

Commit

Permalink
Del using namespace proxygen/lib/stats/test/MockResources.h
Browse files Browse the repository at this point in the history
Summary:
Removes a `using namespace` from the global namespace in pursuit of enabling `-Wheader-hygiene`.
Qualifies instances that relied on the `using namespace`.

Reviewed By: palmje

Differential Revision: D60273889

fbshipit-source-id: b2f1c64720d5e4bac1fa2154e80369921ccf6420
  • Loading branch information
r-barnes authored and facebook-github-bot committed Jul 26, 2024
1 parent 9715f18 commit 3dc6541
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions proxygen/lib/stats/test/MockResources.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,22 @@
#include <proxygen/facebook/lib/statistics/HostResources.h>
#include <proxygen/lib/stats/ResourceData.h>

using namespace proxygen;

/**
* Test Resources implementation that allows us to control what resource data is
* returned to ResourceStats
*/
class MockResources : public Resources {
class MockResources : public proxygen::Resources {
public:
MOCK_METHOD(ResourceData, getCurrentData, ());
MOCK_METHOD(proxygen::ResourceData, getCurrentData, ());

void expectNextCallsToReturnValue(const ResourceData& data, uint64_t times) {
void expectNextCallsToReturnValue(const proxygen::ResourceData& data,
uint64_t times) {
EXPECT_CALL(*this, getCurrentData())
.Times(times)
.WillRepeatedly(testing::Return(data));
}

void expectAllCallsToReturnValue(const ResourceData& data) {
void expectAllCallsToReturnValue(const proxygen::ResourceData& data) {
EXPECT_CALL(*this, getCurrentData()).WillRepeatedly(testing::Return(data));
}

Expand All @@ -48,9 +47,9 @@ class MockResources : public Resources {

// Helper method to get a ResourceData instance formed using the built-in
// test params.
static ResourceData getTestResourceData(
static proxygen::ResourceData getTestResourceData(
const GetTestResourceDataParams& params) {
ResourceData data;
proxygen::ResourceData data;

data.setCpuStats(
params.cpuUtilRatio,
Expand Down

0 comments on commit 3dc6541

Please sign in to comment.