Skip to content

Commit

Permalink
CPP Tests - Prevent failure due to namespace creation on rerun (apach…
Browse files Browse the repository at this point in the history
  • Loading branch information
jai1 authored Oct 17, 2017
1 parent 55e04b6 commit a26c1e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pulsar-client-cpp/tests/ClientDeduplicationTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ TEST(ClientDeduplicationTest, testProducerSequenceAfterReconnect) {
// call admin api to create namespace and enable deduplication
std::string url = adminUrl + "admin/namespaces/sample/standalone/ns-dedup-1";
int res = makePutRequest(url, "");
ASSERT_EQ(res, 204);
ASSERT_TRUE(res == 204 || res == 409);

url = adminUrl + "admin/namespaces/sample/standalone/ns-dedup-1/deduplication";
res = makePostRequest(url, "true");
ASSERT_EQ(res, 204);
ASSERT_TRUE(res == 204 || res == 409);

ReaderConfiguration readerConf;
Reader reader;
Expand Down Expand Up @@ -87,11 +87,11 @@ TEST(ClientDeduplicationTest, testProducerDeduplication) {
// call admin api to create namespace and enable deduplication
std::string url = adminUrl + "admin/namespaces/sample/standalone/ns-dedup-2";
int res = makePutRequest(url, "");
ASSERT_EQ(res, 204);
ASSERT_TRUE(res == 204 || res == 409);

url = adminUrl + "admin/namespaces/sample/standalone/ns-dedup-2/deduplication";
res = makePostRequest(url, "true");
ASSERT_EQ(res, 204);
ASSERT_TRUE(res == 204 || res == 409);

ReaderConfiguration readerConf;
Reader reader;
Expand Down

0 comments on commit a26c1e5

Please sign in to comment.