Skip to content

Commit 459554d

Browse files
committed
typo fix Commited -> Committed
1 parent 0d5b2da commit 459554d

File tree

4 files changed

+34
-34
lines changed

4 files changed

+34
-34
lines changed

docker/test/integration/features/consume_kafka.feature

+4-4
Original file line numberDiff line numberDiff line change
@@ -280,17 +280,17 @@ Feature: Receiving data from using Kafka streaming platform using ConsumeKafka
280280
Scenario Outline: MiNiFi commit policy tests with incoming flowfiles
281281
Given a ConsumeKafka processor set up in a "kafka-consumer-flow" flow
282282
And there is a "processed" subdirectory in the monitored directory
283-
And there is a "commited" subdirectory in the monitored directory
283+
And there is a "committed" subdirectory in the monitored directory
284284
And the "Topic Names" property of the ConsumeKafka processor is set to "ConsumeKafkaTest"
285285
And the "Commit Offsets Policy" property of the ConsumeKafka processor is set to "<commit_policy>"
286286
And the "Offset Reset" property of the ConsumeKafka processor is set to "<offset_reset>"
287287
And the "Security Protocol" property of the ConsumeKafka processor is set to "plaintext"
288288
And the "SASL Mechanism" property of the ConsumeKafka processor is set to "PLAIN"
289289
And a PutFile processor with the name "Consumed" and the "Directory" property set to "/tmp/output/processed" in the "kafka-consumer-flow" flow
290-
And a PutFile processor with the name "Commited" and the "Directory" property set to "/tmp/output/commited" in the "kafka-consumer-flow" flow
290+
And a PutFile processor with the name "Committed" and the "Directory" property set to "/tmp/output/committed" in the "kafka-consumer-flow" flow
291291
And the "success" relationship of the ConsumeKafka processor is connected to the Consumed
292292
And the "success" relationship of the Consumed processor is connected to the ConsumeKafka
293-
And the "commited" relationship of the ConsumeKafka processor is connected to the Commited
293+
And the "committed" relationship of the ConsumeKafka processor is connected to the Committed
294294

295295
And a kafka broker is set up in correspondence with the third-party kafka publisher
296296
And the kafka broker is started
@@ -303,7 +303,7 @@ Feature: Receiving data from using Kafka streaming platform using ConsumeKafka
303303

304304
When a message with content "Tiberius" is published to the "ConsumeKafkaTest" topic
305305
Then exactly these flowfiles are in the monitored directory's "processed" subdirectory in less than 15 seconds: "<contents_after_tiberius>"
306-
And exactly these flowfiles are in the monitored directory's "commited" subdirectory in less than 15 seconds: "<contents_after_tiberius>"
306+
And exactly these flowfiles are in the monitored directory's "committed" subdirectory in less than 15 seconds: "<contents_after_tiberius>"
307307

308308
When a message with content "Caligula" is published to the "ConsumeKafkaTest" topic
309309
Then exactly these flowfiles are in the monitored directory's "processed" subdirectory in less than 15 seconds: "<contents_after_caligula>"

extensions/civetweb/tests/ListenHTTPTests.cpp

+25-25
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class ListenHTTPTestsFixture {
198198

199199
void test_connect(
200200
const std::vector<HttpResponseExpectations>& response_expectations = {HttpResponseExpectations{}},
201-
std::size_t expected_commited_requests = 1,
201+
std::size_t expected_committed_requests = 1,
202202
std::unique_ptr<minifi::http::HTTPClient> client_to_use = {}) {
203203
if (client_to_use) {
204204
REQUIRE(response_expectations.size() == 1);
@@ -231,10 +231,10 @@ class ListenHTTPTestsFixture {
231231
thread.join();
232232
}
233233

234-
if (expected_commited_requests > 0 && (method == HttpRequestMethod::GET || method == HttpRequestMethod::POST)) {
234+
if (expected_committed_requests > 0 && (method == HttpRequestMethod::GET || method == HttpRequestMethod::POST)) {
235235
REQUIRE(LogTestController::getInstance().contains("Size:" + std::to_string(payload.size()) + " Offset:0"));
236236
}
237-
REQUIRE(LogTestController::getInstance().contains("Logged " + std::to_string(expected_commited_requests) + " flow files"));
237+
REQUIRE(LogTestController::getInstance().contains("Logged " + std::to_string(expected_committed_requests) + " flow files"));
238238
}
239239

240240
std::unique_ptr<minifi::http::HTTPClient> initialize_client() {
@@ -330,8 +330,8 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTP no body", "[basic]") {
330330
}
331331

332332
run_server();
333-
const std::size_t expected_commited_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
334-
test_connect({HttpResponseExpectations{}}, expected_commited_requests);
333+
const std::size_t expected_committed_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
334+
test_connect({HttpResponseExpectations{}}, expected_committed_requests);
335335
}
336336

337337
TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTP body with different mime type", "[basic][mime]") {
@@ -349,8 +349,8 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTP body with different mime type", "
349349
}
350350

351351
run_server();
352-
const std::size_t expected_commited_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
353-
test_connect({HttpResponseExpectations{}}, expected_commited_requests);
352+
const std::size_t expected_committed_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
353+
test_connect({HttpResponseExpectations{}}, expected_committed_requests);
354354
}
355355

356356
TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTP all headers", "[basic][headers]") {
@@ -471,8 +471,8 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS without CA", "[basic][https]") {
471471
}
472472

473473
run_server();
474-
const std::size_t expected_commited_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
475-
test_connect({HttpResponseExpectations{}}, expected_commited_requests);
474+
const std::size_t expected_committed_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
475+
test_connect({HttpResponseExpectations{}}, expected_committed_requests);
476476
}
477477

478478
TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS without client cert", "[basic][https]") {
@@ -494,8 +494,8 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS without client cert", "[basic][h
494494
}
495495

496496
run_server();
497-
const std::size_t expected_commited_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
498-
test_connect({HttpResponseExpectations{}}, expected_commited_requests);
497+
const std::size_t expected_committed_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
498+
test_connect({HttpResponseExpectations{}}, expected_committed_requests);
499499
}
500500

501501
TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert from good CA", "[https]") {
@@ -518,8 +518,8 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert from good CA",
518518
}
519519

520520
run_server();
521-
const std::size_t expected_commited_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
522-
test_connect({HttpResponseExpectations{}}, expected_commited_requests);
521+
const std::size_t expected_committed_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
522+
test_connect({HttpResponseExpectations{}}, expected_committed_requests);
523523
}
524524

525525
TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with PKCS12 client cert from good CA", "[https]") {
@@ -542,8 +542,8 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with PKCS12 client cert from goo
542542
}
543543

544544
run_server();
545-
const std::size_t expected_commited_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
546-
test_connect({HttpResponseExpectations{}}, expected_commited_requests);
545+
const std::size_t expected_committed_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
546+
test_connect({HttpResponseExpectations{}}, expected_committed_requests);
547547
}
548548

549549
TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert from bad CA", "[https]") {
@@ -553,7 +553,7 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert from bad CA", "
553553

554554
bool should_succeed = false;
555555
int64_t response_code = 0;
556-
std::size_t expected_commited_requests = 0;
556+
std::size_t expected_committed_requests = 0;
557557
SECTION("verify peer") {
558558
should_succeed = false;
559559
plan->setProperty(listen_http, minifi::processors::ListenHTTP::SSLVerifyPeer, "yes");
@@ -575,12 +575,12 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert from bad CA", "
575575

576576
SECTION("GET") {
577577
method = HttpRequestMethod::GET;
578-
expected_commited_requests = 1;
578+
expected_committed_requests = 1;
579579
}
580580
SECTION("POST") {
581581
method = HttpRequestMethod::POST;
582582
payload = "Test payload";
583-
expected_commited_requests = 1;
583+
expected_committed_requests = 1;
584584
}
585585
SECTION("HEAD") {
586586
method = HttpRequestMethod::HEAD;
@@ -590,7 +590,7 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert from bad CA", "
590590
create_ssl_context_service("goodCA.crt", "badCA_goodClient.pem");
591591

592592
run_server();
593-
test_connect({HttpResponseExpectations{should_succeed, response_code}}, expected_commited_requests);
593+
test_connect({HttpResponseExpectations{should_succeed, response_code}}, expected_committed_requests);
594594
}
595595

596596
TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert with matching DN", "[https][DN]") {
@@ -614,8 +614,8 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert with matching D
614614
}
615615

616616
run_server();
617-
const std::size_t expected_commited_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
618-
test_connect({HttpResponseExpectations{}}, expected_commited_requests);
617+
const std::size_t expected_committed_requests = (method == HttpRequestMethod::POST || method == HttpRequestMethod::GET) ? 1 : 0;
618+
test_connect({HttpResponseExpectations{}}, expected_committed_requests);
619619
}
620620

621621
TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert with non-matching DN", "[https][DN]") {
@@ -625,7 +625,7 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert with non-matchi
625625
plan->setProperty(listen_http, minifi::processors::ListenHTTP::AuthorizedDNPattern, ".*/CN=good\\..*");
626626

627627
int64_t response_code = 0;
628-
std::size_t expected_commited_requests = 0;
628+
std::size_t expected_committed_requests = 0;
629629
SECTION("verify peer") {
630630
plan->setProperty(listen_http, minifi::processors::ListenHTTP::SSLVerifyPeer, "yes");
631631
response_code = 403;
@@ -646,12 +646,12 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert with non-matchi
646646

647647
SECTION("GET") {
648648
method = HttpRequestMethod::GET;
649-
expected_commited_requests = 1;
649+
expected_committed_requests = 1;
650650
}
651651
SECTION("POST") {
652652
method = HttpRequestMethod::POST;
653653
payload = "Test payload";
654-
expected_commited_requests = 1;
654+
expected_committed_requests = 1;
655655
}
656656
SECTION("HEAD") {
657657
method = HttpRequestMethod::HEAD;
@@ -661,7 +661,7 @@ TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS with client cert with non-matchi
661661
create_ssl_context_service("goodCA.crt", "goodCA_badClient.pem");
662662

663663
run_server();
664-
test_connect({HttpResponseExpectations{true, response_code}}, expected_commited_requests);
664+
test_connect({HttpResponseExpectations{true, response_code}}, expected_committed_requests);
665665
}
666666

667667
TEST_CASE_METHOD(ListenHTTPTestsFixture, "HTTPS minimum SSL version", "[https]") {

extensions/kafka/ConsumeKafka.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ void ConsumeKafka::configureNewConnection(core::ProcessContext &context) {
203203
//
204204
// As far as I understand, instead of rd_kafka_position() an rd_kafka_committed() call if preferred here,
205205
// as it properly fetches offsets from the broker
206-
if (const auto retrieved_commited = rd_kafka_committed(consumer_.get(), kf_topic_partition_list_.get(), METADATA_COMMUNICATIONS_TIMEOUT_MS); RD_KAFKA_RESP_ERR_NO_ERROR != retrieved_commited) {
206+
if (const auto retrieved_committed = rd_kafka_committed(consumer_.get(), kf_topic_partition_list_.get(), METADATA_COMMUNICATIONS_TIMEOUT_MS); RD_KAFKA_RESP_ERR_NO_ERROR != retrieved_committed) {
207207
logger_->log_error("Retrieving committed offsets for topics+partitions failed {}: {}",
208-
magic_enum::enum_underlying(retrieved_commited),
209-
rd_kafka_err2str(retrieved_commited));
208+
magic_enum::enum_underlying(retrieved_committed),
209+
rd_kafka_err2str(retrieved_committed));
210210
}
211211

212212
if (rd_kafka_resp_err_t poll_set_consumer_response = rd_kafka_poll_set_consumer(consumer_.get()); RD_KAFKA_RESP_ERR_NO_ERROR != poll_set_consumer_response) {
@@ -335,7 +335,7 @@ void ConsumeKafka::commitOffsetsFromMessages(const std::unordered_map<KafkaMessa
335335

336336
void ConsumeKafka::commitOffsetsFromIncomingFlowFiles(core::ProcessSession& session) const {
337337
std::vector<std::pair<std::shared_ptr<core::FlowFile>, core::Relationship>> flow_files;
338-
while (auto ff = session.get()) { flow_files.push_back({ff, Commited}); }
338+
while (auto ff = session.get()) { flow_files.push_back({ff, Committed}); }
339339
if (flow_files.empty()) { return; }
340340

341341
std::unordered_map<KafkaMessageLocation, int64_t> max_offsets;

extensions/kafka/ConsumeKafka.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class ConsumeKafka final : public KafkaProcessorBase {
261261

262262
EXTENSIONAPI static constexpr auto Success = core::RelationshipDefinition{"success",
263263
"Incoming Kafka messages as flowfiles. Depending on the demarcation strategy, this can be one or multiple messages per flowfile."};
264-
EXTENSIONAPI static constexpr auto Commited = core::RelationshipDefinition{"commited",
264+
EXTENSIONAPI static constexpr auto Committed = core::RelationshipDefinition{"committed",
265265
"Only when using \"Commit from incoming flowfiles\" policy. Flowfiles that were used for commiting offsets are routed here."};
266266
EXTENSIONAPI static constexpr auto Failure = core::RelationshipDefinition{"failure",
267267
"Only when using \"Commit from incoming flowfiles\" policy. Flowfiles that were malformed for commiting offsets are routed here."};

0 commit comments

Comments
 (0)