Skip to content

Commit 289c930

Browse files
Fix broken main branch after Pulsar image was upgraded to 3.2.0 (#400)
The `apachepulsar/pulsar:latest` image was upgraded to 3.2.0 recently, which results the following failed tests: - ExtensibleLoadManagerTest: there are no more lookup requests after namespace unload - ClientTest.testWrongListener: the lookup error message from broker does not contain the exception type
1 parent 1f94dd9 commit 289c930

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/ClientConnection.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ static Result getResult(ServerError serverError, const std::string& message) {
8181
return ResultConsumerBusy;
8282

8383
case ServiceNotReady:
84-
// If the error is not caused by a PulsarServerException, treat it as retryable.
85-
return (message.find("PulsarServerException") == std::string::npos) ? ResultRetryable
86-
: ResultServiceUnitNotReady;
84+
return (message.find("the broker do not have test listener") == std::string::npos)
85+
? ResultRetryable
86+
: ResultServiceUnitNotReady;
8787

8888
case ProducerBlockedQuotaExceededError:
8989
return ResultProducerBlockedQuotaExceededError;

tests/extensibleLM/ExtensibleLoadManagerTest.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,8 @@ TEST(ExtensibleLoadManagerTest, testPubSubWhileUnloading) {
169169
}));
170170
LOG_INFO("after lookup responseData:" << responseDataAfterUnload << ",res:" << res);
171171

172-
// TODO: check lookup counter after pip-307 is released
173172
auto lookupCountAfterUnload = clientImplPtr->getLookupCount();
174-
ASSERT_TRUE(lookupCountBeforeUnload < lookupCountAfterUnload);
173+
ASSERT_EQ(lookupCountBeforeUnload, lookupCountAfterUnload);
175174
break;
176175
}
177176
};

0 commit comments

Comments
 (0)