Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converted to v2 topic names test related to ProducerConsumerBase #1562

Merged
merged 6 commits into from
Apr 13, 2018

Conversation

merlimat
Copy link
Contributor

Motivation

This is the first set of changes to convert unit tests to use v2 topic names.

The PR contains also fixes, mainly to v2 lookup APIs to make sure all the functionalities were supported.

This first batch started the conversion from ProducerConsumerBase test class and all the tests that extends from that. A V1_ProducerConsumerTest test has been retained with v1 name to ensure we don't break existing topics.

Copy link
Member

@sijie sijie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks good to me. left some comments.

@@ -128,7 +128,7 @@ public void deleteNamespace(@PathParam("property") String property, @PathParam("
}

@DELETE
@Path("/{property}/{namespace}/bundle/{bundle}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm this sounds like a breaking change, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only relative to v2 namespace. It was broken when v2 handler created.

import org.apache.pulsar.broker.web.NoSwaggerDocumentation;
import org.apache.pulsar.common.naming.TopicName;

@Path("/v2/destination/")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the path here is wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's probably worth a comment in the code, but it's correct.

The lookup API was already /v2/ in Pulsar 1.xxx. This was internally versioned at Yahoo to not clash from earlier API.

Since we're adding now the "Pulsar v2" we cannot rename this topic lookup into /v1. Rather the difference here would be : lookup/v2/destination/persistent/prop/cluster/ns/topic vs lookup/v2/topic/persistent/prop/ns/topic.

Copy link
Member

@sijie sijie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome!

@merlimat merlimat merged commit ac2721f into apache:master Apr 13, 2018
@merlimat merlimat deleted the test-v2-topics branch April 13, 2018 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants