Skip to content

Commit

Permalink
[fix][broker] Fix failed TokenAuthenticatedProducerConsumerTest (#23602)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2715853)
  • Loading branch information
BewareMyPower authored and lhotari committed Nov 18, 2024
1 parent 6e5aab9 commit a6fabbb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,14 +191,14 @@ public static Object[][] provider() {
}

@Test(dataProvider = "provider")
public void testTopicNotFound(boolean useTcpServiceUrl, boolean useCorrectToken) throws Exception {
public void testTenantNotExist(boolean useTcpServiceUrl, boolean useCorrectToken) throws Exception {
final var operationTimeoutMs = 10000;
final var url = useTcpServiceUrl ? pulsar.getBrokerServiceUrl() : pulsar.getWebServiceAddress();
final var token = useCorrectToken ? ADMIN_TOKEN : USER_TOKEN;
@Cleanup final var client = PulsarClient.builder().serviceUrl(url)
.operationTimeout(operationTimeoutMs, TimeUnit.MILLISECONDS)
.authentication(AuthenticationFactory.token(token)).build();
final var topic = "my-property/not-exist/tp"; // the namespace does not exist
final var topic = "non-exist/not-exist/tp"; // the namespace does not exist
var start = System.currentTimeMillis();
try {
client.newProducer().topic(topic).create();
Expand Down

0 comments on commit a6fabbb

Please sign in to comment.