This is an automated email from the ASF dual-hosted git repository.
lizhanhui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
The following commit(s) were added to refs/heads/master by this push:
new 8129518 Add initial max body size in client setting frame for
producer (#250)
8129518 is described below
commit 812951804d44bceb151021f312760bfcd16312b5
Author: Zhanhui Li <[email protected]>
AuthorDate: Tue Sep 27 17:48:47 2022 +0800
Add initial max body size in client setting frame for producer (#250)
* Add initial max body size in client setting frame for producer
* Mark scheduler as flaky
---
.github/workflows/cpp_build.yml | 2 +-
cpp/source/rocketmq/ProducerImpl.cpp | 3 +++
cpp/source/scheduler/tests/BUILD.bazel | 1 +
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/cpp_build.yml b/.github/workflows/cpp_build.yml
index 3d182c9..f303f8e 100644
--- a/.github/workflows/cpp_build.yml
+++ b/.github/workflows/cpp_build.yml
@@ -33,4 +33,4 @@ jobs:
- name: Run Unit Tests On macOS
working-directory: ./cpp
if: runner.os == 'macOS'
- run: bazel test //...
+ run: bazel test --test_output=errors //...
diff --git a/cpp/source/rocketmq/ProducerImpl.cpp
b/cpp/source/rocketmq/ProducerImpl.cpp
index e02cd1a..a56d803 100644
--- a/cpp/source/rocketmq/ProducerImpl.cpp
+++ b/cpp/source/rocketmq/ProducerImpl.cpp
@@ -580,6 +580,9 @@ void
ProducerImpl::topicsOfInterest(std::vector<std::string> topics) {
void ProducerImpl::buildClientSettings(rmq::Settings& settings) {
settings.set_client_type(rmq::ClientType::PRODUCER);
+
settings.mutable_publishing()->set_max_body_size(MixAll::MAX_MESSAGE_BODY_SIZE);
+ settings.mutable_publishing()->set_validate_message_type(false);
+
auto topics = settings.mutable_publishing()->mutable_topics();
{
absl::MutexLock lk(&topics_mtx_);
diff --git a/cpp/source/scheduler/tests/BUILD.bazel
b/cpp/source/scheduler/tests/BUILD.bazel
index 32d347b..daee6de 100644
--- a/cpp/source/scheduler/tests/BUILD.bazel
+++ b/cpp/source/scheduler/tests/BUILD.bazel
@@ -27,4 +27,5 @@ cc_test(
"//source/scheduler:scheduler_library",
"@com_google_googletest//:gtest_main",
],
+ flaky = True,
)
\ No newline at end of file