-
Notifications
You must be signed in to change notification settings - Fork 91
Adding proto only Request Source Config factory #560
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
Changes from 135 commits
99f45d1
075a4cf
ecbf407
8fb11b6
032dbba
953e953
6185edb
cded6ad
fbfe523
0d70179
cdb7efe
f15bb47
59359a2
f63df91
406bd6b
f0b697b
8425e48
fb4f372
c6eae6c
96ae38b
b17240f
5c5a146
29591ff
7d928a9
ff82d95
98381a4
83ac556
38c5084
fa4e285
8551c76
437de5e
6cef87e
c84ba4d
77d33f9
73aa686
ef77d65
b9182a0
e38dd80
21734e4
7cda9d2
f827aca
d194736
7820cf9
bee7805
3db68ce
c0ec4dd
a1dd3f2
0b25261
c3fa23c
547977e
c300203
8f4d4d9
5ae2d51
fe74b6d
6d87aea
ca7a0c2
967e3f8
14b7d79
c4985bb
922639a
81dfece
bf08661
34900c5
768fa81
e93bb58
f47cbd4
7c5c6b2
1b02cec
4d75602
c74f535
9949fb8
fcf10d3
fd9744d
68c1037
883ee30
8c34b25
6ce7e74
92927e5
a62f2d5
16f89c6
f4257e3
d075588
eb10a3b
cdbd6bf
17acc5f
55a0e62
fa23aad
b8e2447
248f439
91703b5
bbc0c2a
517c83d
c1d0428
bc86c09
33e3564
338a874
402ada2
017481f
3ed43fc
247b71b
171fb2e
5df83ed
0af3ffd
ff90e59
e57c05f
55244b0
c710d37
fbb2fdc
ae0f4a8
e092de0
19b7aa0
dae3098
a4b6fb1
55f685e
59c5b94
2ea0c5e
d40a073
7146079
7ab1132
72c23d0
2b1170c
9dc3c4b
b555a71
3924eee
75eca07
9c93ff9
e2af886
edae9be
949d731
59d490f
078329a
530cc9c
22cc3f8
32489d0
324bb23
5d6bb26
32ae13d
12708ac
eff2f4e
b890df4
a907913
49a47a4
b711028
8a2d792
22b93aa
7b9c175
bab49fc
fc7eda6
49e6eec
43de3d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ import "google/protobuf/wrappers.proto"; | |
| import "validate/validate.proto"; | ||
| import "api/client/options.proto"; | ||
|
|
||
| // Configuration for FileBasedPluginRequestSource (plugin name: | ||
| // Configuration for OptionsListFromFileRequestSourceFactory (plugin name: | ||
| // "nighthawk.file-based-request-source-plugin") | ||
| // The factory will load the RequestOptionsList from the file, and then passes it to the | ||
| // requestSource it generates. The resulting request source will loop over the RequestOptionsList it | ||
|
|
@@ -25,6 +25,18 @@ message FileBasedPluginConfig { | |
| google.protobuf.UInt32Value max_file_size = 3 [(validate.rules).uint32 = {lte: 1000000}]; | ||
| } | ||
|
|
||
| // Configuration for OptionsListFromProtoRequestSourceFactory (plugin name: | ||
| // "nighthawk.in-line-options-list-request-source-plugin") that uses rpc | ||
| message InLinePluginConfig { | ||
| // The options_list will be used to generate Requests in the RequestSource. | ||
| nighthawk.client.RequestOptionsList options_list = 1; | ||
| // The pluginfactory makes requestSources that will generate requests from the RequestOptionList | ||
| // up to num_requests number of times. If num_requests exceeds the number of RequestOptions in the | ||
| // RequestOptionList located in the file at file_path, it will loop. num_requests = 0 means no | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "If num_requests exceeds the number of RequestOptions in options_list, it will loop."
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice catch. Sorry about that one. |
||
| // limit on the number of requests to be produced. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might want to clarify that it will loop through the configured requests indefinitely but will terminate by normal mechanisms (duration of the benchmark elapsed, or some other failure or termination predicate was met).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. I think that's a fair comment. |
||
| google.protobuf.UInt32Value num_requests = 2 [(validate.rules).uint32 = {gte: 0, lte: 1000000}]; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1,000,000 would be exhausted in only 100 seconds at 10,000 qps. Is there any reason to limit the range? This constraint could just be We should also comment whether every field is required or optional. |
||
| } | ||
|
|
||
| // Configuration for StubPluginRequestSource (plugin name: "nighthawk.stub-request-source-plugin") | ||
| // The plugin does nothing. This is for testing and comparison of the Request Source Plugin Factory | ||
| // mechanism using a minimal version of plugin that does not require a more complicated proto or | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,6 +45,36 @@ RequestSourcePtr OptionsListFromFileRequestSourceFactory::createRequestSourcePlu | |
|
|
||
| REGISTER_FACTORY(OptionsListFromFileRequestSourceFactory, RequestSourcePluginConfigFactory); | ||
|
|
||
| std::string OptionsListFromProtoRequestSourceFactory::name() const { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would name this request source consistently with its config proto.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that this naming better expresses that they're both making an optionsListRequestSource. I would be open to renaming the configProto, but I'm not sure what a better name would be.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, I didn't realize the RequestSource plugin itself was the same. It would be easier to understand for new readers if:
What about:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with this. I think this is sufficiently concise while also adding clarification. I had originally included these, but I think the way I had named it introduced parsing difficulty. This is much better. |
||
| return "nighthawk.in-line-options-list-request-source-plugin"; | ||
| } | ||
|
|
||
| Envoy::ProtobufTypes::MessagePtr | ||
| OptionsListFromProtoRequestSourceFactory::createEmptyConfigProto() { | ||
| return std::make_unique<nighthawk::request_source::InLinePluginConfig>(); | ||
| } | ||
|
|
||
| RequestSourcePtr OptionsListFromProtoRequestSourceFactory::createRequestSourcePlugin( | ||
| const Envoy::Protobuf::Message& message, Envoy::Api::Api&, | ||
| Envoy::Http::RequestHeaderMapPtr header) { | ||
| const auto& any = dynamic_cast<const Envoy::ProtobufWkt::Any&>(message); | ||
| nighthawk::request_source::InLinePluginConfig config; | ||
| Envoy::MessageUtil::unpackTo(any, config); | ||
| // Locking to avoid issues with multiple threads calling this at the same time and trying to set | ||
| // the options_list_ | ||
| { | ||
| Envoy::Thread::LockGuard lock_guard(options_list_lock_); | ||
| // Only loading the config into memory the first time. | ||
| if (options_list_.options_size() == 0) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: I think that relying on
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes sense to me. Thanks for the suggestion. |
||
| options_list_ = config.options_list(); | ||
| } | ||
| } | ||
| return std::make_unique<RequestOptionsListRequestSource>(config.num_requests().value(), | ||
| std::move(header), options_list_); | ||
| } | ||
|
|
||
| REGISTER_FACTORY(OptionsListFromProtoRequestSourceFactory, RequestSourcePluginConfigFactory); | ||
|
|
||
| RequestOptionsListRequestSource::RequestOptionsListRequestSource( | ||
| const uint32_t total_requests, Envoy::Http::RequestHeaderMapPtr header, | ||
| const nighthawk::client::RequestOptionsList& options_list) | ||
|
|
@@ -72,7 +102,8 @@ RequestGenerator RequestOptionsListRequestSource::get() { | |
| header->setMethod(envoy::config::core::v3::RequestMethod_Name(request_option.request_method())); | ||
| const uint32_t content_length = request_option.request_body_size().value(); | ||
| if (content_length > 0) { | ||
| header->setContentLength(content_length); | ||
| header->setContentLength( | ||
| content_length); // Content length is used later in stream_decoder to populate the body | ||
| } | ||
| for (const envoy::config::core::v3::HeaderValueOption& option_header : | ||
| request_option.request_headers()) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,4 +81,36 @@ class OptionsListFromFileRequestSourceFactory : public virtual RequestSourcePlug | |
| // This factory will be activated through RequestSourceFactory in factories.h | ||
| DECLARE_FACTORY(OptionsListFromFileRequestSourceFactory); | ||
|
|
||
| // Factory that creates a RequestOptionsListRequestSource from a InLinePluginConfig proto. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, it isn't, but you're not the first person to ask that. I have two different factories that are both making a requestOptionsListRequestSource, one of them is the OptionsListFromFileRequestSourceFactory and the other is the OptionsListFromProtoRequestSourceFactory. I can get rid of the word Request at the front of the RequestOptionsListRequestSource and hopefully that makes it easier. |
||
| // Registered as an Envoy plugin. | ||
| // Implementation of RequestSourceConfigFactory which produces a RequestSource that keeps an | ||
| // RequestOptionsList in memory, and loads it with the RequestOptions passed to it from the config. | ||
| // All plugins configuration are specified in the request_source_plugin.proto. Usage: assume you are | ||
| // passed an appropriate Any type object called config, an Api object called api, and a default | ||
| // header called header. auto& config_factory = | ||
| // Envoy::Config::Utility::getAndCheckFactoryByName<RequestSourcePluginConfigFactory>( | ||
| // "nighthawk.in-line-options-list-request-source-plugin"); | ||
| // RequestSourcePtr plugin = | ||
| // config_factory.createRequestSourcePlugin(config, std::move(api), std::move(header)); | ||
|
|
||
| class OptionsListFromProtoRequestSourceFactory : public virtual RequestSourcePluginConfigFactory { | ||
| public: | ||
| std::string name() const override; | ||
| Envoy::ProtobufTypes::MessagePtr createEmptyConfigProto() override; | ||
|
|
||
| // This implementation is not thread safe. Only the first call to createRequestSourcePlugin will | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought the lock would make it thread safe. Also, if we're making a copy anyway, can we get rid of the lock and just pass the entire unpacked
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To add clarification. The reason we're passing this by reference and doing this locking thing at all, is because I wanted to reuse the logic for the OptionsListRequestSource, and since the FileBased implementation passes by reference for space reasons, it made sense to do the same here. |
||
| // load the options list into memory and subsequent calls just make a copy of the options_list | ||
| // that was already loaded. | ||
| RequestSourcePtr createRequestSourcePlugin(const Envoy::Protobuf::Message& message, | ||
| Envoy::Api::Api& api, | ||
| Envoy::Http::RequestHeaderMapPtr header) override; | ||
|
|
||
| private: | ||
| Envoy::Thread::MutexBasicLockable options_list_lock_; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are saying the class is not thread safe, why do we need a lock? Once we proclaim it thread-unsafe, nobody should be calling it from multiple threads. If we do include a lock, we should use it to its intended purpose which is to make the class thread safe. Maybe I am misunderstanding it, but looks like we are in a hybrid state where we do pay the cost of locking for no benefit. Taking a step back, we should probably first agree whether we need this class to be thread safe. If you think we do, can you help by describing a scenario where this needs to be accessed by multiple threads? Once we understand that, we can discuss how to design it to be compatible with the intended use.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It should be thread safe. Sorry for the confusion. |
||
| nighthawk::client::RequestOptionsList options_list_; | ||
| }; | ||
|
|
||
| // This factory will be activated through RequestSourceFactory in factories.h | ||
| DECLARE_FACTORY(OptionsListFromProtoRequestSourceFactory); | ||
|
|
||
| } // namespace Nighthawk | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ namespace Nighthawk { | |
|
|
||
| namespace { | ||
| using nighthawk::request_source::FileBasedPluginConfig; | ||
| using nighthawk::request_source::InLinePluginConfig; | ||
| using nighthawk::request_source::StubPluginConfig; | ||
| using ::testing::NiceMock; | ||
| using ::testing::Test; | ||
|
|
@@ -43,6 +44,19 @@ class FileBasedRequestSourcePluginTest : public Test { | |
| } | ||
| }; | ||
|
|
||
| class InLineRequestSourcePluginTest : public Test { | ||
| public: | ||
| InLineRequestSourcePluginTest() : api_(Envoy::Api::createApiForTest(stats_store_)) {} | ||
| Envoy::Stats::MockIsolatedStatsStore stats_store_; | ||
| Envoy::Api::ApiPtr api_; | ||
| nighthawk::request_source::InLinePluginConfig | ||
| MakeInLinePluginConfig(nighthawk::client::RequestOptionsList options_list, int num_requests) { | ||
| nighthawk::request_source::InLinePluginConfig config; | ||
| *config.mutable_options_list() = std::move(options_list); | ||
| config.mutable_num_requests()->set_value(num_requests); | ||
| return config; | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would make this a standalone function to clarify that it doesn't need any of the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok. |
||
| }; | ||
| TEST_F(StubRequestSourcePluginTest, CreateEmptyConfigProtoCreatesCorrectType) { | ||
| auto& config_factory = | ||
| Envoy::Config::Utility::getAndCheckFactoryByName<RequestSourcePluginConfigFactory>( | ||
|
|
@@ -155,7 +169,6 @@ TEST_F(FileBasedRequestSourcePluginTest, | |
| CreateRequestSourcePluginWithMoreNumRequestsThanInFileGetsWorkingRequestGeneratorThatLoops) { | ||
| nighthawk::request_source::FileBasedPluginConfig config = MakeFileBasedPluginConfigWithTestYaml( | ||
| TestEnvironment::runfilesPath("test/request_source/test_data/test-config.yaml")); | ||
| config.mutable_num_requests()->set_value(4); | ||
| Envoy::ProtobufWkt::Any config_any; | ||
| config_any.PackFrom(config); | ||
| auto& config_factory = | ||
|
|
@@ -175,5 +188,96 @@ TEST_F(FileBasedRequestSourcePluginTest, | |
| EXPECT_EQ(header2->getPathValue(), "/b"); | ||
| EXPECT_EQ(header3->getPathValue(), "/a"); | ||
| } | ||
|
|
||
| TEST_F(InLineRequestSourcePluginTest, CreateEmptyConfigProtoCreatesCorrectType) { | ||
| auto& config_factory = | ||
| Envoy::Config::Utility::getAndCheckFactoryByName<RequestSourcePluginConfigFactory>( | ||
| "nighthawk.in-line-options-list-request-source-plugin"); | ||
| const Envoy::ProtobufTypes::MessagePtr empty_config = config_factory.createEmptyConfigProto(); | ||
| const nighthawk::request_source::InLinePluginConfig expected_config; | ||
| EXPECT_EQ(empty_config->DebugString(), expected_config.DebugString()); | ||
| EXPECT_TRUE(Envoy::MessageUtil()(*empty_config, expected_config)); | ||
| } | ||
|
|
||
| TEST_F(InLineRequestSourcePluginTest, FactoryRegistrationUsesCorrectPluginName) { | ||
| nighthawk::request_source::InLinePluginConfig config; | ||
| Envoy::ProtobufWkt::Any config_any; | ||
| config_any.PackFrom(config); | ||
| auto& config_factory = | ||
| Envoy::Config::Utility::getAndCheckFactoryByName<RequestSourcePluginConfigFactory>( | ||
| "nighthawk.in-line-options-list-request-source-plugin"); | ||
| EXPECT_EQ(config_factory.name(), "nighthawk.in-line-options-list-request-source-plugin"); | ||
| } | ||
|
|
||
| TEST_F(InLineRequestSourcePluginTest, CreateRequestSourcePluginCreatesCorrectPluginType) { | ||
| Envoy::MessageUtil util; | ||
| nighthawk::client::RequestOptionsList options_list; | ||
| util.loadFromFile(TestEnvironment::runfilesPath("test/request_source/test_data/test-config.yaml"), | ||
| options_list, Envoy::ProtobufMessage::getStrictValidationVisitor(), *api_, | ||
| true); | ||
| nighthawk::request_source::InLinePluginConfig config = MakeInLinePluginConfig(options_list, 2); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Understood. |
||
| Envoy::ProtobufWkt::Any config_any; | ||
| config_any.PackFrom(config); | ||
| auto& config_factory = | ||
| Envoy::Config::Utility::getAndCheckFactoryByName<RequestSourcePluginConfigFactory>( | ||
| "nighthawk.in-line-options-list-request-source-plugin"); | ||
| auto header = Envoy::Http::RequestHeaderMapImpl::create(); | ||
| RequestSourcePtr plugin = | ||
| config_factory.createRequestSourcePlugin(config_any, *api_, std::move(header)); | ||
| EXPECT_NE(dynamic_cast<RequestOptionsListRequestSource*>(plugin.get()), nullptr); | ||
| } | ||
| TEST_F(InLineRequestSourcePluginTest, | ||
|
Comment on lines
+228
to
+245
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: add blank line
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. |
||
| CreateRequestSourcePluginGetsWorkingRequestGeneratorThatEndsAtNumRequest) { | ||
| Envoy::MessageUtil util; | ||
| nighthawk::client::RequestOptionsList options_list; | ||
| util.loadFromFile(TestEnvironment::runfilesPath("test/request_source/test_data/test-config.yaml"), | ||
| options_list, Envoy::ProtobufMessage::getStrictValidationVisitor(), *api_, | ||
| true); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you comment this parameter name,
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure thing. Added clarifying comments throughout. |
||
| nighthawk::request_source::InLinePluginConfig config = MakeInLinePluginConfig(options_list, 2); | ||
| Envoy::ProtobufWkt::Any config_any; | ||
| config_any.PackFrom(config); | ||
| auto& config_factory = | ||
| Envoy::Config::Utility::getAndCheckFactoryByName<RequestSourcePluginConfigFactory>( | ||
| "nighthawk.in-line-options-list-request-source-plugin"); | ||
| auto header = Envoy::Http::RequestHeaderMapImpl::create(); | ||
| RequestSourcePtr plugin = | ||
| config_factory.createRequestSourcePlugin(config_any, *api_, std::move(header)); | ||
| Nighthawk::RequestGenerator generator = plugin->get(); | ||
| Nighthawk::RequestPtr request = generator(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure. |
||
| Nighthawk::RequestPtr request2 = generator(); | ||
| Nighthawk::RequestPtr request3 = generator(); | ||
| Nighthawk::HeaderMapPtr header1 = request->header(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should do e.g.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. |
||
| Nighthawk::HeaderMapPtr header2 = request2->header(); | ||
| EXPECT_EQ(header1->getPathValue(), "/a"); | ||
| EXPECT_EQ(header2->getPathValue(), "/b"); | ||
| EXPECT_EQ(request3, nullptr); | ||
| } | ||
| TEST_F(InLineRequestSourcePluginTest, | ||
| CreateRequestSourcePluginWithMoreNumRequestsThanInFileGetsWorkingRequestGeneratorThatLoops) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe the reference to File is stale here; also the looping is the main point, might not need to mention that it's a working request generator
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense. |
||
| Envoy::MessageUtil util; | ||
| nighthawk::client::RequestOptionsList options_list; | ||
| util.loadFromFile(TestEnvironment::runfilesPath("test/request_source/test_data/test-config.yaml"), | ||
| options_list, Envoy::ProtobufMessage::getStrictValidationVisitor(), *api_, | ||
| true); | ||
| nighthawk::request_source::InLinePluginConfig config = MakeInLinePluginConfig(options_list, 4); | ||
| Envoy::ProtobufWkt::Any config_any; | ||
| config_any.PackFrom(config); | ||
| auto& config_factory = | ||
| Envoy::Config::Utility::getAndCheckFactoryByName<RequestSourcePluginConfigFactory>( | ||
| "nighthawk.in-line-options-list-request-source-plugin"); | ||
| auto header = Envoy::Http::RequestHeaderMapImpl::create(); | ||
| RequestSourcePtr plugin = | ||
| config_factory.createRequestSourcePlugin(config_any, *api_, std::move(header)); | ||
| Nighthawk::RequestGenerator generator = plugin->get(); | ||
| Nighthawk::RequestPtr request = generator(); | ||
| Nighthawk::RequestPtr request2 = generator(); | ||
| Nighthawk::RequestPtr request3 = generator(); | ||
| Nighthawk::HeaderMapPtr header1 = request->header(); | ||
| Nighthawk::HeaderMapPtr header2 = request2->header(); | ||
| Nighthawk::HeaderMapPtr header3 = request3->header(); | ||
| EXPECT_EQ(header1->getPathValue(), "/a"); | ||
| EXPECT_EQ(header2->getPathValue(), "/b"); | ||
| EXPECT_EQ(header3->getPathValue(), "/a"); | ||
| } | ||
| } // namespace | ||
| } // namespace Nighthawk | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be
FileBasedPluginRequestSourceThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this naming better expresses that they're both making an optionsListRequestSource.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean isn't this a typo? This appears to be the comment above
FileBasedPluginConfigThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OHHH I didn't see
Filein the middle of the name, never mind!