This is an automated email from the ASF dual-hosted git repository.

yong pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 3fd035d78d039453efc67358b28cfb8ff5520bed
Author: Kai Wang <[email protected]>
AuthorDate: Mon Jan 31 23:56:39 2022 +0800

    [C++] Fix pulsar client cpp build fail in gcc-4.8.5 (#14053)
    
    * Fix pulsar client cpp build fail in gcc-4.8.5
    
    * Enable test
    
    * Speedup make speed
    
    * Add a new line at the tail
    
    Add a new line at the tail of a file
    
    (cherry picked from commit caf5acf0d5e1971e4a9958da582b905793f75f1f)
---
 pulsar-client-cpp/docker-build-centos7.sh    | 2 +-
 pulsar-client-cpp/docker/centos-7/Dockerfile | 7 +++++++
 pulsar-client-cpp/tests/ConsumerTest.cc      | 2 +-
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/pulsar-client-cpp/docker-build-centos7.sh 
b/pulsar-client-cpp/docker-build-centos7.sh
index 5ceeca9..e97e374 100755
--- a/pulsar-client-cpp/docker-build-centos7.sh
+++ b/pulsar-client-cpp/docker-build-centos7.sh
@@ -32,7 +32,7 @@ cd -
 
 VOLUME_OPTION=${VOLUME_OPTION:-"-v $ROOT_DIR:/pulsar"}
 COMMAND="cd /pulsar/pulsar-client-cpp && mkdir -p _builds && cd _builds &&
- /opt/cmake/cmake-3.4.0-Linux-x86_64/bin/cmake .. -DBUILD_PYTHON_WRAPPER=OFF 
-DBUILD_TESTS=OFF && make"
+ /opt/cmake/cmake-3.4.0-Linux-x86_64/bin/cmake .. -DBUILD_PYTHON_WRAPPER=OFF 
-DBUILD_TESTS=ON && make -j8"
 
 DOCKER_CMD="docker run -i ${VOLUME_OPTION} ${IMAGE}"
 
diff --git a/pulsar-client-cpp/docker/centos-7/Dockerfile 
b/pulsar-client-cpp/docker/centos-7/Dockerfile
index fb157e1..61af2bf 100644
--- a/pulsar-client-cpp/docker/centos-7/Dockerfile
+++ b/pulsar-client-cpp/docker/centos-7/Dockerfile
@@ -29,3 +29,10 @@ RUN mkdir -p /opt/cmake
 WORKDIR /opt/cmake
 RUN curl -L -O https://cmake.org/files/v3.4/cmake-3.4.0-Linux-x86_64.tar.gz \
   && tar zxf cmake-3.4.0-Linux-x86_64.tar.gz
+
+# googletest
+RUN curl -O -L 
https://github.com/google/googletest/archive/refs/tags/release-1.10.0.tar.gz \
+  && tar zxf release-1.10.0.tar.gz \
+  && cd googletest-release-1.10.0 \
+  && mkdir build && cd build \
+  && /opt/cmake/cmake-3.4.0-Linux-x86_64/bin/cmake .. && make install
diff --git a/pulsar-client-cpp/tests/ConsumerTest.cc 
b/pulsar-client-cpp/tests/ConsumerTest.cc
index b5a49c1..e4f37e1 100644
--- a/pulsar-client-cpp/tests/ConsumerTest.cc
+++ b/pulsar-client-cpp/tests/ConsumerTest.cc
@@ -445,7 +445,7 @@ TEST(ConsumerTest, testGetTopicNameFromReceivedMessage) {
 
     // 2. MultiTopicsConsumerImpl
     Consumer consumer2;
-    ASSERT_EQ(ResultOk, client.subscribe({topic1, topic2}, "sub-2", 
consumer2));
+    ASSERT_EQ(ResultOk, client.subscribe(std::vector<std::string>{topic1, 
topic2}, "sub-2", consumer2));
 
     sendMessage(topic1, true);
     validateTopicName(consumer1, topic1);

Reply via email to